Revert "Hash-based dex cache type array."
Reverting to work around some programs crashing with
Check failed: handle_scope_iface.Get() != nullptr.
though the reason for the failure not yet understood.
Test: m test-art-host
Bug: 34839984
Bug: 30627598
Bug: 34659969
Bug: 30419309
This reverts commit ec7862283dd49f5a58d0ac45960ce27c2f7671b8.
Change-Id: Ifded663633082f1e59e5b6ff2e026dc559bd6b82
diff --git a/runtime/class_linker_test.cc b/runtime/class_linker_test.cc
index 6eee0bd..17510bb 100644
--- a/runtime/class_linker_test.cc
+++ b/runtime/class_linker_test.cc
@@ -914,7 +914,7 @@
class_linker_->LookupResolvedType(dex_file, type_idx, dex_cache, class_loader.Get()),
klass);
// Zero out the resolved type and make sure LookupResolvedType still finds it.
- dex_cache->ClearResolvedType(type_idx);
+ dex_cache->SetResolvedType(type_idx, nullptr);
EXPECT_TRUE(dex_cache->GetResolvedType(type_idx) == nullptr);
EXPECT_OBJ_PTR_EQ(
class_linker_->LookupResolvedType(dex_file, type_idx, dex_cache, class_loader.Get()),
@@ -949,7 +949,7 @@
class_linker_->LookupResolvedType(dex_file, array_idx, dex_cache.Get(), class_loader.Get()),
array_klass);
// Zero out the resolved type and make sure LookupResolvedType() still finds it.
- dex_cache->ClearResolvedType(array_idx);
+ dex_cache->SetResolvedType(array_idx, nullptr);
EXPECT_TRUE(dex_cache->GetResolvedType(array_idx) == nullptr);
EXPECT_OBJ_PTR_EQ(
class_linker_->LookupResolvedType(dex_file, array_idx, dex_cache.Get(), class_loader.Get()),
@@ -972,7 +972,7 @@
class_linker_->LookupResolvedType(dex_file, type_idx, dex_cache.Get(), class_loader.Get()),
klass.Get());
// Zero out the resolved type and make sure LookupResolvedType still finds it.
- dex_cache->ClearResolvedType(type_idx);
+ dex_cache->SetResolvedType(type_idx, nullptr);
EXPECT_TRUE(dex_cache->GetResolvedType(type_idx) == nullptr);
EXPECT_OBJ_PTR_EQ(
class_linker_->LookupResolvedType(dex_file, type_idx, dex_cache.Get(), class_loader.Get()),
@@ -990,7 +990,7 @@
class_linker_->LookupResolvedType(dex_file, type_idx, dex_cache.Get(), class_loader.Get()),
klass.Get());
// Zero out the resolved type and make sure LookupResolvedType() still finds it.
- dex_cache->ClearResolvedType(type_idx);
+ dex_cache->SetResolvedType(type_idx, nullptr);
EXPECT_TRUE(dex_cache->GetResolvedType(type_idx) == nullptr);
EXPECT_OBJ_PTR_EQ(
class_linker_->LookupResolvedType(dex_file, type_idx, dex_cache.Get(), class_loader.Get()),