summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-11-10 16:34:29 -0800
committer Ian Rogers <irogers@google.com> 2014-11-10 16:34:29 -0800
commitc35cda8fc5bb891eb9726a093f5764b75f44ab54 (patch)
treed7aaec89b6360ce11956883bce6e0904021aa25b
parentfa7ec00ae4f9f8b1c8e1ad809155cfa675a0121d (diff)
Fix parentheses, tidy code.
Change-Id: I1ce671fa8a402aed3552102cadc96f277346f443
-rw-r--r--compiler/dex/quick/mir_to_lir.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/compiler/dex/quick/mir_to_lir.cc b/compiler/dex/quick/mir_to_lir.cc
index ccaa167d6a..92ef70db7e 100644
--- a/compiler/dex/quick/mir_to_lir.cc
+++ b/compiler/dex/quick/mir_to_lir.cc
@@ -417,10 +417,10 @@ void Mir2Lir::CompileDalvikInstruction(MIR* mir, BasicBlock* bb, LIR* label_list
RegLocation rl_src[3];
RegLocation rl_dest = mir_graph_->GetBadLoc();
RegLocation rl_result = mir_graph_->GetBadLoc();
- Instruction::Code opcode = mir->dalvikInsn.opcode;
- int opt_flags = mir->optimization_flags;
- uint32_t vB = mir->dalvikInsn.vB;
- uint32_t vC = mir->dalvikInsn.vC;
+ const Instruction::Code opcode = mir->dalvikInsn.opcode;
+ const int opt_flags = mir->optimization_flags;
+ const uint32_t vB = mir->dalvikInsn.vB;
+ const uint32_t vC = mir->dalvikInsn.vC;
DCHECK(CheckCorePoolSanity()) << PrettyMethod(cu_->method_idx, *cu_->dex_file) << " @ 0x:"
<< std::hex << current_dalvik_offset_;
@@ -572,7 +572,7 @@ void Mir2Lir::CompileDalvikInstruction(MIR* mir, BasicBlock* bb, LIR* label_list
GenThrow(rl_src[0]);
break;
- case Instruction::ARRAY_LENGTH:
+ case Instruction::ARRAY_LENGTH: {
int len_offset;
len_offset = mirror::Array::LengthOffset().Int32Value();
rl_src[0] = LoadValue(rl_src[0], kRefReg);
@@ -582,7 +582,7 @@ void Mir2Lir::CompileDalvikInstruction(MIR* mir, BasicBlock* bb, LIR* label_list
MarkPossibleNullPointerException(opt_flags);
StoreValue(rl_dest, rl_result);
break;
-
+ }
case Instruction::CONST_STRING:
case Instruction::CONST_STRING_JUMBO:
GenConstString(vB, rl_dest);
@@ -666,8 +666,7 @@ void Mir2Lir::CompileDalvikInstruction(MIR* mir, BasicBlock* bb, LIR* label_list
GenCompareAndBranch(opcode, rl_src[0], rl_src[1], taken);
}
break;
- }
-
+ }
case Instruction::IF_EQZ:
case Instruction::IF_NEZ:
case Instruction::IF_LTZ:
@@ -693,7 +692,7 @@ void Mir2Lir::CompileDalvikInstruction(MIR* mir, BasicBlock* bb, LIR* label_list
GenCompareZeroAndBranch(opcode, rl_src[0], taken);
}
break;
- }
+ }
case Instruction::AGET_WIDE:
GenArrayGet(opt_flags, k64, rl_src[0], rl_src[1], rl_dest, 3);