From 51d4445f215d4a301fc72ba7a79e9ca8532b525b Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 27 Sep 2022 11:24:07 +0200 Subject: Move ReflectionTest.StaticMainMethod to compiler/. And clean up some related code. Test: m test-art-host-gtest Test: atest art_standalone_runtime_tests Test: atest art_standalone_compiler_tests Test: atest ArtGtestsTargetChroot Change-Id: I6b60e553dad7111f6247fbd873cd46af11f00276 --- compiler/common_compiler_test.cc | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'compiler/common_compiler_test.cc') diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc index bbb2016566..ab0e3e17cf 100644 --- a/compiler/common_compiler_test.cc +++ b/compiler/common_compiler_test.cc @@ -267,40 +267,6 @@ void CommonCompilerTestImpl::CompileMethod(ArtMethod* method) { CompiledMethod::ReleaseSwapAllocatedCompiledMethod(&storage, compiled_method); } -void CommonCompilerTestImpl::CompileDirectMethod(Handle class_loader, - const char* class_name, - const char* method_name, - const char* signature) { - std::string class_descriptor(DotToDescriptor(class_name)); - Thread* self = Thread::Current(); - ClassLinker* class_linker = GetClassLinker(); - ObjPtr klass = - class_linker->FindClass(self, class_descriptor.c_str(), class_loader); - CHECK(klass != nullptr) << "Class not found " << class_name; - auto pointer_size = class_linker->GetImagePointerSize(); - ArtMethod* method = klass->FindClassMethod(method_name, signature, pointer_size); - CHECK(method != nullptr && method->IsDirect()) << "Direct method not found: " - << class_name << "." << method_name << signature; - CompileMethod(method); -} - -void CommonCompilerTestImpl::CompileVirtualMethod(Handle class_loader, - const char* class_name, - const char* method_name, - const char* signature) { - std::string class_descriptor(DotToDescriptor(class_name)); - Thread* self = Thread::Current(); - ClassLinker* class_linker = GetClassLinker(); - ObjPtr klass = - class_linker->FindClass(self, class_descriptor.c_str(), class_loader); - CHECK(klass != nullptr) << "Class not found " << class_name; - auto pointer_size = class_linker->GetImagePointerSize(); - ArtMethod* method = klass->FindClassMethod(method_name, signature, pointer_size); - CHECK(method != nullptr && !method->IsDirect()) << "Virtual method not found: " - << class_name << "." << method_name << signature; - CompileMethod(method); -} - void CommonCompilerTestImpl::ClearBootImageOption() { compiler_options_->image_type_ = CompilerOptions::ImageType::kNone; } -- cgit v1.2.3-59-g8ed1b