diff options
author | 2016-11-17 15:21:22 -0800 | |
---|---|---|
committer | 2016-11-21 10:57:00 -0800 | |
commit | a5b09a67034e57a6e10231dd4bd92f4cb50b824c (patch) | |
tree | 304be738f4fa528b7ad2676103eecc84c79eaeeb /runtime/native/dalvik_system_VMRuntime.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 'runtime/native/dalvik_system_VMRuntime.cc')
-rw-r--r-- | runtime/native/dalvik_system_VMRuntime.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/runtime/native/dalvik_system_VMRuntime.cc b/runtime/native/dalvik_system_VMRuntime.cc index 866dc7f73f..48feb11924 100644 --- a/runtime/native/dalvik_system_VMRuntime.cc +++ b/runtime/native/dalvik_system_VMRuntime.cc @@ -34,6 +34,7 @@ extern "C" void android_set_application_target_sdk_version(uint32_t version); #include "common_throws.h" #include "debugger.h" #include "dex_file-inl.h" +#include "dex_file_types.h" #include "gc/accounting/card_table-inl.h" #include "gc/allocator/dlmalloc.h" #include "gc/heap.h" @@ -305,7 +306,7 @@ static void PreloadDexCachesResolveString( // Based on ClassLinker::ResolveType. static void PreloadDexCachesResolveType(Thread* self, ObjPtr<mirror::DexCache> dex_cache, - uint32_t type_idx) + dex::TypeIndex type_idx) REQUIRES_SHARED(Locks::mutator_lock_) { ObjPtr<mirror::Class> klass = dex_cache->GetResolvedType(type_idx); if (klass != nullptr) { @@ -455,7 +456,7 @@ static void PreloadDexCachesStatsFilled(DexCacheStats* filled) } } for (size_t j = 0; j < dex_cache->NumResolvedTypes(); j++) { - ObjPtr<mirror::Class> klass = dex_cache->GetResolvedType(j); + ObjPtr<mirror::Class> klass = dex_cache->GetResolvedType(dex::TypeIndex(j)); if (klass != nullptr) { filled->num_types++; } @@ -519,7 +520,7 @@ static void VMRuntime_preloadDexCaches(JNIEnv* env, jobject) { if (kPreloadDexCachesTypes) { for (size_t j = 0; j < dex_cache->NumResolvedTypes(); j++) { - PreloadDexCachesResolveType(soa.Self(), dex_cache.Get(), j); + PreloadDexCachesResolveType(soa.Self(), dex_cache.Get(), dex::TypeIndex(j)); } } |