From 19a19cffd197a28ae4c9c3e59eff6352fd392241 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 22 Oct 2014 16:07:05 +0100 Subject: Add support for static fields in optimizing compiler. Change-Id: Id2f010589e2bd6faf42c05bb33abf6816ebe9fa9 --- compiler/optimizing/code_generator.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 28ff1cf83a..c61e991956 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -26,6 +26,9 @@ #include "gc_map_builder.h" #include "leb128.h" #include "mapping_table.h" +#include "mirror/array-inl.h" +#include "mirror/object_array-inl.h" +#include "mirror/object_reference.h" #include "ssa_liveness_analysis.h" #include "utils/assembler.h" #include "verifier/dex_gc_map.h" @@ -33,6 +36,10 @@ namespace art { +size_t CodeGenerator::GetCacheOffset(uint32_t index) { + return mirror::ObjectArray::OffsetOfElement(index).SizeValue(); +} + void CodeGenerator::CompileBaseline(CodeAllocator* allocator, bool is_leaf) { const GrowableArray& blocks = GetGraph()->GetBlocks(); DCHECK(blocks.Get(0) == GetGraph()->GetEntryBlock()); -- cgit v1.2.3-59-g8ed1b