ART: Verifier cleanup
Start making the method verifier more independent of externalities.
This will be implemented as incremental changes.
In this CL, replace querrying Runtime::Current() for the classlinker
with requiring the classlinker to use at construction time.
Test: m test-art-host
Change-Id: Id0a6a1f01c77bfe4cc9adfb490fc6ebc7bbf6392
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 731dfe7..fc32114 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -1079,7 +1079,7 @@
// initialize the StackOverflowError class (as it might require running the verifier). Instead,
// ensure that the class will be initialized.
if (kMemoryToolIsAvailable && !Runtime::Current()->IsAotCompiler()) {
- verifier::ClassVerifier::Init(); // Need to prepare the verifier.
+ verifier::ClassVerifier::Init(this); // Need to prepare the verifier.
ObjPtr<mirror::Class> soe_klass = FindSystemClass(self, "Ljava/lang/StackOverflowError;");
if (soe_klass == nullptr || !EnsureInitialized(self, hs.NewHandle(soe_klass), true, true)) {