Refactor java.lang.reflect implementation
Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1.
Move to ArtMethod/Field instead of AbstractMethod/Field and have
java.lang.reflect APIs delegate to ArtMethod/ArtField.
Bug: 10014286.
Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
diff --git a/runtime/common_test.h b/runtime/common_test.h
index 7110e11..ced2af9 100644
--- a/runtime/common_test.h
+++ b/runtime/common_test.h
@@ -181,7 +181,7 @@
reinterpret_cast<uint32_t>(gc_map));
}
- void MakeExecutable(mirror::AbstractMethod* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ void MakeExecutable(mirror::ArtMethod* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
CHECK(method != NULL);
LOG(INFO) << "MakeExecutable " << PrettyMethod(method);
@@ -348,7 +348,7 @@
compiler_driver_->SetSupportBootImageFixup(false);
// We're back in native, take the opportunity to initialize well known classes.
- WellKnownClasses::InitClasses(Thread::Current()->GetJniEnv());
+ WellKnownClasses::Init(Thread::Current()->GetJniEnv());
// Create the heap thread pool so that the GC runs in parallel for tests. Normally, the thread
// pool is created by the runtime.
runtime_->GetHeap()->CreateThreadPool();
@@ -464,7 +464,7 @@
}
}
- void CompileMethod(mirror::AbstractMethod* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ void CompileMethod(mirror::ArtMethod* method) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
CHECK(method != NULL);
base::TimingLogger timings("CommonTest::CompileMethod", false, false);
timings.StartSplit("CompileOne");
@@ -480,7 +480,7 @@
std::string class_descriptor(DotToDescriptor(class_name));
mirror::Class* klass = class_linker_->FindClass(class_descriptor.c_str(), class_loader);
CHECK(klass != NULL) << "Class not found " << class_name;
- mirror::AbstractMethod* method = klass->FindDirectMethod(method_name, signature);
+ mirror::ArtMethod* method = klass->FindDirectMethod(method_name, signature);
CHECK(method != NULL) << "Direct method not found: "
<< class_name << "." << method_name << signature;
CompileMethod(method);
@@ -494,7 +494,7 @@
std::string class_descriptor(DotToDescriptor(class_name));
mirror::Class* klass = class_linker_->FindClass(class_descriptor.c_str(), class_loader);
CHECK(klass != NULL) << "Class not found " << class_name;
- mirror::AbstractMethod* method = klass->FindVirtualMethod(method_name, signature);
+ mirror::ArtMethod* method = klass->FindVirtualMethod(method_name, signature);
CHECK(method != NULL) << "Virtual method not found: "
<< class_name << "." << method_name << signature;
CompileMethod(method);