diff options
author | Vladimir Marko <vmarko@google.com> | 2014-02-26 11:24:15 +0000 |
---|---|---|
committer | Vladimir Marko <vmarko@google.com> | 2014-03-03 12:55:45 +0000 |
commit | be0e546730e532ef0987cd4bde2c6f5a1b14dd2a (patch) | |
tree | 41aa0541ec85b8e26c5e50cc7341f506f5d52314 /compiler/dex/dex_to_dex_compiler.cc | |
parent | cc261bfd336eddac18b85d4eb47f6c905d495241 (diff) | |
download | art-be0e546730e532ef0987cd4bde2c6f5a1b14dd2a.tar.gz art-be0e546730e532ef0987cd4bde2c6f5a1b14dd2a.tar.bz2 art-be0e546730e532ef0987cd4bde2c6f5a1b14dd2a.zip |
Cache field lowering info in mir_graph.
Change-Id: I9f9d76e3ae6c31e88bdf3f59820d31a625da020f
Diffstat (limited to 'compiler/dex/dex_to_dex_compiler.cc')
-rw-r--r-- | compiler/dex/dex_to_dex_compiler.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/dex/dex_to_dex_compiler.cc b/compiler/dex/dex_to_dex_compiler.cc index ff8fea0f88..b9f9437c95 100644 --- a/compiler/dex/dex_to_dex_compiler.cc +++ b/compiler/dex/dex_to_dex_compiler.cc @@ -208,21 +208,21 @@ void DexCompiler::CompileInstanceFieldAccess(Instruction* inst, return; } uint32_t field_idx = inst->VRegC_22c(); - int field_offset; + MemberOffset field_offset(0u); bool is_volatile; bool fast_path = driver_.ComputeInstanceFieldInfo(field_idx, &unit_, is_put, &field_offset, &is_volatile); - if (fast_path && !is_volatile && IsUint(16, field_offset)) { + if (fast_path && !is_volatile && IsUint(16, field_offset.Int32Value())) { VLOG(compiler) << "Quickening " << Instruction::Name(inst->Opcode()) << " to " << Instruction::Name(new_opcode) << " by replacing field index " << field_idx - << " by field offset " << field_offset + << " by field offset " << field_offset.Int32Value() << " at dex pc " << StringPrintf("0x%x", dex_pc) << " in method " << PrettyMethod(unit_.GetDexMethodIndex(), GetDexFile(), true); // We are modifying 4 consecutive bytes. inst->SetOpcode(new_opcode); // Replace field index by field offset. - inst->SetVRegC_22c(static_cast<uint16_t>(field_offset)); + inst->SetVRegC_22c(static_cast<uint16_t>(field_offset.Int32Value())); } } |