From 05792b98980741111b4d0a24d68cff2a8e070a3a Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Mon, 3 Aug 2015 11:56:49 +0100 Subject: ART: Move DexCache arrays to native. This CL has a companion CL in libcore/ https://android-review.googlesource.com/162985 Change-Id: Icbc9e20ad1b565e603195b12714762bb446515fa --- compiler/optimizing/code_generator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 503187bd3d..f4cf9b5130 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::OffsetOfElement(index).SizeValue(); + return sizeof(GcRoot) * 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) { -- cgit v1.2.3-59-g8ed1b