ART: Change CanAssumeVerified to GetPreviousClassState
Return any stored class state instead of a bool to allow more
recognized states in the future.
Bug: 63467744
Bug: 65318848
Test: m test-art-host
Change-Id: Id097273a41e09ee77c8d53377ad9beb09104a944
diff --git a/runtime/compiler_callbacks.h b/runtime/compiler_callbacks.h
index c51bb5e..9b22714 100644
--- a/runtime/compiler_callbacks.h
+++ b/runtime/compiler_callbacks.h
@@ -19,6 +19,7 @@
#include "base/mutex.h"
#include "class_reference.h"
+#include "class_status.h"
namespace art {
@@ -51,8 +52,10 @@
virtual verifier::VerifierDeps* GetVerifierDeps() const = 0;
virtual void SetVerifierDeps(verifier::VerifierDeps* deps ATTRIBUTE_UNUSED) {}
- virtual bool CanAssumeVerified(ClassReference ref ATTRIBUTE_UNUSED) {
- return false;
+ // Return the class status of a previous stage of the compilation. This can be used, for example,
+ // when class unloading is enabled during multidex compilation.
+ virtual ClassStatus GetPreviousClassState(ClassReference ref ATTRIBUTE_UNUSED) {
+ return ClassStatus::kStatusNotReady;
}
virtual void SetDoesClassUnloading(bool does_class_unloading ATTRIBUTE_UNUSED,