summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2015-09-04 10:34:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-09-04 10:34:04 +0000
commit957fb8930766ae422568e7b1b816159a9e9bc18c (patch)
tree849a611f978656f1c85182402e1ef2c8ca50c5e6 /compiler/optimizing/code_generator.cc
parent68ffda887e35f35e978f2f607b7a91e44a5e1969 (diff)
parent05792b98980741111b4d0a24d68cff2a8e070a3a (diff)
Merge "ART: Move DexCache arrays to native."
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r--compiler/optimizing/code_generator.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index a6fc4557f7..1097adbaf3 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -129,12 +129,12 @@ static bool CheckTypeConsistency(HInstruction* instruction) {
}
size_t CodeGenerator::GetCacheOffset(uint32_t index) {
- return mirror::ObjectArray<mirror::Object>::OffsetOfElement(index).SizeValue();
+ return sizeof(GcRoot<mirror::Object>) * index;
}
size_t CodeGenerator::GetCachePointerOffset(uint32_t index) {
auto pointer_size = InstructionSetPointerSize(GetInstructionSet());
- return mirror::Array::DataOffset(pointer_size).Uint32Value() + pointer_size * index;
+ return pointer_size * index;
}
void CodeGenerator::CompileBaseline(CodeAllocator* allocator, bool is_leaf) {