diff options
author | Christopher R. Palmer <crpalmer@gmail.com> | 2015-09-20 05:49:10 -0400 |
---|---|---|
committer | AdrianDC <radian.dc@gmail.com> | 2015-11-09 01:19:59 +0100 |
commit | 7890e2edd305ddacfe76b37337cdbe95bcd588f8 (patch) | |
tree | 5872f3268dff1d8b5964ab3d37ec93f19b84239b | |
parent | 487963318e176f5e63d7e32475bfe93cf3c2decd (diff) | |
download | art-7890e2edd305ddacfe76b37337cdbe95bcd588f8.zip art-7890e2edd305ddacfe76b37337cdbe95bcd588f8.tar.gz art-7890e2edd305ddacfe76b37337cdbe95bcd588f8.tar.bz2 |
art: Fix whitespace errors added by caf
All of these errors break compilation with GCC 4.9 and based on
a spot check appear to be all CAF introduced changes. Fix these
to avoid future breakage.
Conflicts:
compiler/dex/mir_graph.h
compiler/dex/quick/arm/assemble_arm.cc
compiler/dex/quick/arm/codegen_arm.h
compiler/dex/quick/arm/target_arm.cc
compiler/dex/quick/arm64/codegen_arm64.h
compiler/dex/quick/arm64/target_arm64.cc
compiler/dex/quick/mir_to_lir.h
compiler/utils/growable_array.h
Changes:
compiler/dex/mir_graph.h
compiler/dex/mir_optimization.cc
compiler/dex/quick/arm/codegen_arm.h
compiler/dex/quick/arm/target_arm.cc
compiler/dex/quick/mir_to_lir.h
compiler/dex/quick/quick_compiler.cc
compiler/driver/compiler_driver.cc
compiler/optimizing/inliner.cc
compiler/optimizing/nodes.cc
compiler/optimizing/optimizing_compiler.cc
Change-Id: I3e23e1449eea0565fbe6f91251190b1e153f16cf
Signed-off-by: AdrianDC <radian.dc@gmail.com>
-rw-r--r-- | compiler/dex/mir_graph.cc | 5 | ||||
-rw-r--r-- | compiler/dex/mir_graph.h | 4 | ||||
-rw-r--r-- | compiler/dex/mir_optimization.cc | 3 | ||||
-rw-r--r-- | compiler/dex/quick/arm/assemble_arm.cc | 2 | ||||
-rw-r--r-- | compiler/dex/quick/arm/codegen_arm.h | 6 | ||||
-rw-r--r-- | compiler/dex/quick/arm/target_arm.cc | 13 | ||||
-rw-r--r-- | compiler/dex/quick/arm64/codegen_arm64.h | 4 | ||||
-rw-r--r-- | compiler/dex/quick/arm64/target_arm64.cc | 11 | ||||
-rw-r--r-- | compiler/dex/quick/mir_to_lir.h | 6 | ||||
-rw-r--r-- | compiler/dex/quick/quick_compiler.cc | 3 | ||||
-rw-r--r-- | compiler/driver/compiler_driver.cc | 3 | ||||
-rw-r--r-- | compiler/optimizing/inliner.cc | 6 | ||||
-rw-r--r-- | compiler/optimizing/nodes.cc | 2 | ||||
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 4 | ||||
-rw-r--r-- | compiler/utils/growable_array.h | 2 |
15 files changed, 29 insertions, 45 deletions
diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc index 4ddf347..01b6e47 100644 --- a/compiler/dex/mir_graph.cc +++ b/compiler/dex/mir_graph.cc @@ -166,8 +166,7 @@ MIRGraph::~MIRGraph() { CleanupGraphData(); } -void MIRGraph::CleanupGraphData() -{ +void MIRGraph::CleanupGraphData() { } /* * Parse an instruction, return the length of the instruction @@ -959,7 +958,7 @@ static bool CreateDumpFile(std::string& fname, const char* dir_prefix, NarrowDex return true; } -const char * MIRGraph::GetExtendedMirOpName(int index){ +const char * MIRGraph::GetExtendedMirOpName(int index) { return extended_mir_op_names_[index]; } diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h index a362196..e60172f 100644 --- a/compiler/dex/mir_graph.h +++ b/compiler/dex/mir_graph.h @@ -377,7 +377,6 @@ class MIR : public ArenaObject<kArenaAllocMIR> { MIR* Copy(MIRGraph* mir_Graph); ExtendedMIR* extraData; - }; struct SuccessorBlockInfo; @@ -1302,7 +1301,7 @@ class MIRGraph { bool SupportMLA() QC_WEAK; void SetPassFail() { pass_failed_ = true; } - bool PassFailed() { return pass_failed_; }; + bool PassFailed() { return pass_failed_; } protected: int FindCommonParent(int block1, int block2); @@ -1520,7 +1519,6 @@ class MIRGraph { public: QCMIRGraph* qcm; - }; } // namespace art diff --git a/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc index b107865..0e045b3 100644 --- a/compiler/dex/mir_optimization.cc +++ b/compiler/dex/mir_optimization.cc @@ -464,8 +464,7 @@ static bool EvaluateBranch(Instruction::Code opcode, int32_t src1, int32_t src2) return is_taken; } -bool MIRGraph::SupportMLA() -{ +bool MIRGraph::SupportMLA() { return true; } diff --git a/compiler/dex/quick/arm/assemble_arm.cc b/compiler/dex/quick/arm/assemble_arm.cc index 57ebca6..7751676 100644 --- a/compiler/dex/quick/arm/assemble_arm.cc +++ b/compiler/dex/quick/arm/assemble_arm.cc @@ -1084,7 +1084,7 @@ void ArmMir2Lir::InsertFixupBefore(LIR* prev_lir, LIR* orig_lir, LIR* new_lir) { uint32_t ArmMir2Lir::ProcessMoreEncodings(const ArmEncodingMap* encoder, int i, uint32_t operand) { LOG(FATAL) << "Bad fmt:" << encoder->field_loc[i].kind << " " << operand; - uint32_t value=0; + uint32_t value = 0; return value; } diff --git a/compiler/dex/quick/arm/codegen_arm.h b/compiler/dex/quick/arm/codegen_arm.h index 2fee96d..3ae8790 100644 --- a/compiler/dex/quick/arm/codegen_arm.h +++ b/compiler/dex/quick/arm/codegen_arm.h @@ -282,7 +282,7 @@ class ArmMir2Lir FINAL : public Mir2Lir { LIR* InvokeTrampoline(OpKind op, RegStorage r_tgt, QuickEntrypointEnum trampoline) OVERRIDE; size_t GetInstructionOffset(LIR* lir); void GenMoreMachineSpecificExtendedMethodMIR(BasicBlock* bb, MIR* mir) QC_WEAK; - //void MachineSpecificPreprocessMIR(BasicBlock* bb, MIR* mir); + // void MachineSpecificPreprocessMIR(BasicBlock* bb, MIR* mir); void GenMachineSpecificExtendedMethodMIR(BasicBlock* bb, MIR* mir) OVERRIDE; @@ -290,6 +290,7 @@ class ArmMir2Lir FINAL : public Mir2Lir { RegLocation rl_src, RegLocation rl_dest, int lit) OVERRIDE; void CleanupCodeGenData() QC_WEAK; + private: void GenNegLong(RegLocation rl_dest, RegLocation rl_src); void GenMulLong(Instruction::Code opcode, RegLocation rl_dest, RegLocation rl_src1, @@ -379,8 +380,7 @@ class ArmMir2Lir FINAL : public Mir2Lir { friend class QCArmMir2Lir; public: - QCArmMir2Lir * qcm2l ; - + QCArmMir2Lir * qcm2l; }; } // namespace art diff --git a/compiler/dex/quick/arm/target_arm.cc b/compiler/dex/quick/arm/target_arm.cc index 6702f79..fd16bb8 100644 --- a/compiler/dex/quick/arm/target_arm.cc +++ b/compiler/dex/quick/arm/target_arm.cc @@ -140,9 +140,8 @@ ResourceMask ArmMir2Lir::GetRegMaskCommon(const RegStorage& reg) const { return GetRegMaskArm(reg); } -void ArmMir2Lir::CompilerPostInitializeRegAlloc() -{ - //nothing here +void ArmMir2Lir::CompilerPostInitializeRegAlloc() { + // nothing here } constexpr ResourceMask ArmMir2Lir::GetRegMaskArm(RegStorage reg) { @@ -597,13 +596,11 @@ ArmMir2Lir::ArmMir2Lir(CompilationUnit* cu, MIRGraph* mir_graph, ArenaAllocator* ArmMir2LirPostInit(this); } -ArmMir2Lir::~ArmMir2Lir() -{ +ArmMir2Lir::~ArmMir2Lir() { CleanupCodeGenData(); } -void ArmMir2Lir::CleanupCodeGenData() -{ +void ArmMir2Lir::CleanupCodeGenData() { } void ArmMir2Lir::ArmMir2LirPostInit(ArmMir2Lir*) { @@ -1036,7 +1033,7 @@ void ArmMir2Lir::GenMachineSpecificExtendedMethodMIR(BasicBlock* bb, MIR* mir) { // LOG(FATAL) << "Unexpected opcode: " << mir->dalvikInsn.opcode; } } -void ArmMir2Lir::GenMoreMachineSpecificExtendedMethodMIR(BasicBlock*, MIR*){ +void ArmMir2Lir::GenMoreMachineSpecificExtendedMethodMIR(BasicBlock*, MIR*) { // nothing here } diff --git a/compiler/dex/quick/arm64/codegen_arm64.h b/compiler/dex/quick/arm64/codegen_arm64.h index 0570332..016cb0f 100644 --- a/compiler/dex/quick/arm64/codegen_arm64.h +++ b/compiler/dex/quick/arm64/codegen_arm64.h @@ -275,7 +275,7 @@ class Arm64Mir2Lir FINAL : public Mir2Lir { void CleanupCodeGenData() QC_WEAK; -private: + private: /** * @brief Given register xNN (dNN), returns register wNN (sNN). * @param reg #RegStorage containing a Solo64 input register (e.g. @c x1 or @c d2). @@ -423,7 +423,7 @@ private: void Cleanup() QC_WEAK; -private: + private: static uint32_t ProcessMoreEncodings(const A64EncodingMap* encoder, int i, uint32_t operand) QC_WEAK; static const A64EncodingMap* GetEncoder(int opcode) QC_WEAK; diff --git a/compiler/dex/quick/arm64/target_arm64.cc b/compiler/dex/quick/arm64/target_arm64.cc index bf40c54..f772572 100644 --- a/compiler/dex/quick/arm64/target_arm64.cc +++ b/compiler/dex/quick/arm64/target_arm64.cc @@ -140,9 +140,8 @@ RegStorage Arm64Mir2Lir::TargetReg(SpecialTargetRegister reg) { return res_reg; } -void Arm64Mir2Lir::CompilerPostInitializeRegAlloc() -{ - //nothing here +void Arm64Mir2Lir::CompilerPostInitializeRegAlloc() { + // nothing here } /* @@ -624,12 +623,10 @@ Arm64Mir2Lir::Arm64Mir2Lir(CompilationUnit* cu, MIRGraph* mir_graph, ArenaAlloca Arm64Mir2LirPostInit(this); } -void Arm64Mir2Lir::CleanupCodeGenData() -{ +void Arm64Mir2Lir::CleanupCodeGenData() { } -Arm64Mir2Lir::~Arm64Mir2Lir() -{ +Arm64Mir2Lir::~Arm64Mir2Lir() { CleanupCodeGenData(); } diff --git a/compiler/dex/quick/mir_to_lir.h b/compiler/dex/quick/mir_to_lir.h index d041448..0d2da42 100644 --- a/compiler/dex/quick/mir_to_lir.h +++ b/compiler/dex/quick/mir_to_lir.h @@ -695,7 +695,7 @@ class Mir2Lir { void ApplyLoadStoreElimination(LIR* head_lir, LIR* tail_lir); void ApplyLoadHoisting(LIR* head_lir, LIR* tail_lir); virtual void ApplyLocalOptimizations(LIR* head_lir, LIR* tail_lir); - virtual void ApplyArchOptimizations(LIR*, LIR*, BasicBlock*) { return; }; + virtual void ApplyArchOptimizations(LIR*, LIR*, BasicBlock*) { return; } // Shared by all targets - implemented in ralloc_util.cc int GetSRegHi(int lowSreg); @@ -1356,7 +1356,7 @@ class Mir2Lir { virtual void GenMachineSpecificExtendedMethodMIR(BasicBlock* bb, MIR* mir); /* non virtual so it doesn't have to be implemented */ - virtual void MachineSpecificPreprocessMIR(BasicBlock*, MIR*) { }; + virtual void MachineSpecificPreprocessMIR(BasicBlock*, MIR*) { } /** * @brief Lowers the kMirOpSelect MIR into LIR. @@ -1422,7 +1422,7 @@ class Mir2Lir { virtual LIR* OpMem(OpKind op, RegStorage r_base, int disp) = 0; virtual void OpPcRelLoad(RegStorage reg, LIR* target) = 0; virtual LIR* OpReg(OpKind op, RegStorage r_dest_src) = 0; - virtual LIR* OpBkpt() { // not abstract so it doesn't have to be implemeted for other platforms + virtual LIR* OpBkpt() { // not abstract so it doesn't have to be implemeted for other platforms return NULL; }; virtual void OpRegCopy(RegStorage r_dest, RegStorage r_src) = 0; diff --git a/compiler/dex/quick/quick_compiler.cc b/compiler/dex/quick/quick_compiler.cc index 43f96d9..4469b51 100644 --- a/compiler/dex/quick/quick_compiler.cc +++ b/compiler/dex/quick/quick_compiler.cc @@ -492,8 +492,7 @@ static bool CanCompileShorty(const char* shorty, InstructionSet instruction_set) } // check certain conditions that we don't want Quick compiler to handle -bool QuickCompiler::CheckMoreConditions(CompilationUnit*) const -{ +bool QuickCompiler::CheckMoreConditions(CompilationUnit*) const { return true; } diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index d150ed0..cebe44f 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -2538,8 +2538,7 @@ bool CompilerDriver::IsStringInit(uint32_t method_index, const DexFile* dex_file return inliner->IsStringInitMethodIndex(method_index); } -SafeMap<int32_t, int32_t> *CompilerDriver::GetStatusMap(Thread *) -{ +SafeMap<int32_t, int32_t> *CompilerDriver::GetStatusMap(Thread *) { return nullptr; } diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc index 9b0a697..d434839 100644 --- a/compiler/optimizing/inliner.cc +++ b/compiler/optimizing/inliner.cc @@ -76,16 +76,14 @@ void HInliner::Run() { // additional check for an inlinable method bool HInliner::CanInlineMethod(const DexCompilationUnit& , HGraph&, - HInvoke*) const -{ + HInvoke*) const { return false; } // try if we can remove exception checks void HInliner::TryRemoveExceptionChecks(const DexCompilationUnit&, HGraph&, - HInvoke*) const -{ + HInvoke*) const { return; } diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 742e316..119c22c 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1335,7 +1335,7 @@ void HGraph::InlineInto(HGraph* outer_graph, HInvoke* invoke) { } } } - //inlining loop + // inlining loop if (info_callee != nullptr) { ((ArenaBitVector &)(info_callee->GetBlocks())).ClearAllBits(); info_callee->Populate(); diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index 6dc20fe..5f741b9 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -326,8 +326,7 @@ HOptimization* GetMoreOptimizing(HGraph*, HOptimization* GetMoreOptimizing(HGraph*, const DexCompilationUnit&, CompilerDriver*, - OptimizingCompilerStats*) -{ + OptimizingCompilerStats*) { return nullptr; } @@ -714,7 +713,6 @@ CompiledMethod* TryFastCompile(CompilerDriver*, uint32_t, jobject, const DexFile&) { - return nullptr; } diff --git a/compiler/utils/growable_array.h b/compiler/utils/growable_array.h index 7455818..3215102 100644 --- a/compiler/utils/growable_array.h +++ b/compiler/utils/growable_array.h @@ -129,7 +129,7 @@ class GrowableArray : public ArenaObject<kArenaAllocGrowableArray> { } // We should either have found the element, or it was the last (unscanned) element. // if element is not in array, don't touch anything - if(!found && (element != elem_list_[num_used_ - 1])) + if (!found && (element != elem_list_[num_used_ - 1])) return; num_used_--; } |