diff options
author | Andreas Gampe <agampe@google.com> | 2016-11-17 15:21:22 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2016-11-21 10:57:00 -0800 |
commit | a5b09a67034e57a6e10231dd4bd92f4cb50b824c (patch) | |
tree | 304be738f4fa528b7ad2676103eecc84c79eaeeb /compiler/image_writer.cc | |
parent | dac7ad17c78387d15d7aefae0f852dddf5f37e34 (diff) |
ART: Add dex::TypeIndex
Add abstraction for uint16_t type index.
Test: m test-art-host
Change-Id: I47708741c7c579cbbe59ab723c1e31c5fe71f83a
Diffstat (limited to 'compiler/image_writer.cc')
-rw-r--r-- | compiler/image_writer.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index d7b7403442..a706697496 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -32,6 +32,7 @@ #include "class_linker-inl.h" #include "compiled_method.h" #include "dex_file-inl.h" +#include "dex_file_types.h" #include "driver/compiler_driver.h" #include "elf_file.h" #include "elf_utils.h" @@ -890,9 +891,9 @@ void ImageWriter::PruneNonImageClasses() { } ObjPtr<mirror::DexCache> dex_cache = self->DecodeJObject(data.weak_root)->AsDexCache(); for (size_t i = 0; i < dex_cache->NumResolvedTypes(); i++) { - Class* klass = dex_cache->GetResolvedType(i); + Class* klass = dex_cache->GetResolvedType(dex::TypeIndex(i)); if (klass != nullptr && !KeepClass(klass)) { - dex_cache->SetResolvedType(i, nullptr); + dex_cache->SetResolvedType(dex::TypeIndex(i), nullptr); } } ArtMethod** resolved_methods = dex_cache->GetResolvedMethods(); |