diff options
author | 2016-11-17 15:21:22 -0800 | |
---|---|---|
committer | 2016-11-21 10:57:00 -0800 | |
commit | a5b09a67034e57a6e10231dd4bd92f4cb50b824c (patch) | |
tree | 304be738f4fa528b7ad2676103eecc84c79eaeeb /runtime/mirror/dex_cache-inl.h | |
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/mirror/dex_cache-inl.h')
-rw-r--r-- | runtime/mirror/dex_cache-inl.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/mirror/dex_cache-inl.h b/runtime/mirror/dex_cache-inl.h index c7a123b580..d903f71604 100644 --- a/runtime/mirror/dex_cache-inl.h +++ b/runtime/mirror/dex_cache-inl.h @@ -69,15 +69,15 @@ inline void DexCache::ClearString(uint32_t string_idx) { } } -inline Class* DexCache::GetResolvedType(uint32_t type_idx) { - DCHECK_LT(type_idx, NumResolvedTypes()); - return GetResolvedTypes()[type_idx].Read(); +inline Class* DexCache::GetResolvedType(dex::TypeIndex type_idx) { + DCHECK_LT(type_idx.index_, NumResolvedTypes()); + return GetResolvedTypes()[type_idx.index_].Read(); } -inline void DexCache::SetResolvedType(uint32_t type_idx, ObjPtr<Class> resolved) { - DCHECK_LT(type_idx, NumResolvedTypes()); // NOTE: Unchecked, i.e. not throwing AIOOB. +inline void DexCache::SetResolvedType(dex::TypeIndex type_idx, ObjPtr<Class> resolved) { + DCHECK_LT(type_idx.index_, NumResolvedTypes()); // NOTE: Unchecked, i.e. not throwing AIOOB. // TODO default transaction support. - GetResolvedTypes()[type_idx] = GcRoot<Class>(resolved); + GetResolvedTypes()[type_idx.index_] = GcRoot<Class>(resolved); // TODO: Fine-grained marking, so that we don't need to go through all arrays in full. Runtime::Current()->GetHeap()->WriteBarrierEveryFieldOf(this); } |