Revert "Avoid recording CHA class status for dex2oat"
Tests fail
Bug: 63905544
Bug: 63467744
This reverts commit 79ad831d82f78494caa2f1b44ba24ad6f712565e.
Change-Id: I14c4c4e857498c02dc5c15f4bd3248728ecf5ad5
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 3ae8528..a227d18 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -5431,8 +5431,7 @@
ArtMethod* imt_data[ImTable::kSize];
// If there are any new conflicts compared to super class.
bool new_conflict = false;
- Runtime* const runtime = Runtime::Current();
- std::fill_n(imt_data, arraysize(imt_data), runtime->GetImtUnimplementedMethod());
+ std::fill_n(imt_data, arraysize(imt_data), Runtime::Current()->GetImtUnimplementedMethod());
if (!LinkMethods(self, klass, interfaces, &new_conflict, imt_data)) {
return false;
}
@@ -5491,12 +5490,8 @@
// Update CHA info based on whether we override methods.
// Have to do this before setting the class as resolved which allows
// instantiation of klass.
- if (!runtime->IsAotCompiler()) {
- // AOT compiler doesn't use CHA.
- // If this is enabled for the compiler, the cha_dependency_map_ probably needs to be
- // cleared if unloading happens after compilation.
- runtime->GetClassHierarchyAnalysis()->UpdateAfterLoadingOf(klass);
- }
+ Runtime::Current()->GetClassHierarchyAnalysis()->UpdateAfterLoadingOf(klass);
+
// This will notify waiters on klass that saw the not yet resolved
// class in the class_table_ during EnsureResolved.
mirror::Class::SetStatus(klass, mirror::Class::kStatusResolved, self);
@@ -5543,9 +5538,7 @@
// Update CHA info based on whether we override methods.
// Have to do this before setting the class as resolved which allows
// instantiation of klass.
- if (!runtime->IsAotCompiler()) {
- runtime->GetClassHierarchyAnalysis()->UpdateAfterLoadingOf(h_new_class);
- }
+ Runtime::Current()->GetClassHierarchyAnalysis()->UpdateAfterLoadingOf(h_new_class);
// This will notify waiters on temp class that saw the not yet resolved class in the
// class_table_ during EnsureResolved.