diff options
| author | 2021-06-10 09:52:53 +0100 | |
|---|---|---|
| committer | 2021-12-20 12:07:43 +0000 | |
| commit | ba1b94e8ebf35947e1ce127d67ab164a76ec251c (patch) | |
| tree | 58f5d61d767315ef8dd2734f9be1c48532e8ce55 /dex2oat/driver/compiler_driver.cc | |
| parent | c8d57bec6249f3222e5f05f8f7e46baf06865ffe (diff) | |
Clean up Class::GetDirectInterface().
Fetch array interfaces from the `IfTable`. This removes the
only use of the `Thread* self` argument, so we can remove
that argument. We also make the function non-static to avoid
the explicit `klass` argument. Similarly clean up arguments
of `Class::FindClass()` and `Class::FindStaticClass()`.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
(cherry picked from commit b10668cb6a34398eb720f9a6305ff9a51b3ebfd4)
Merged-In: Id639b675b4eb331a777cf318eb61bd19e05de4f0
Change-Id: I34d11499aea5a95864bf1cdcb4f210547a07f33c
Diffstat (limited to 'dex2oat/driver/compiler_driver.cc')
| -rw-r--r-- | dex2oat/driver/compiler_driver.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dex2oat/driver/compiler_driver.cc b/dex2oat/driver/compiler_driver.cc index 9029693999..26f606e25c 100644 --- a/dex2oat/driver/compiler_driver.cc +++ b/dex2oat/driver/compiler_driver.cc @@ -1124,7 +1124,7 @@ static void MaybeAddToImageClasses(Thread* self, image_classes->insert(descriptor); VLOG(compiler) << "Adding " << descriptor << " to image classes"; for (size_t i = 0, num_interfaces = klass->NumDirectInterfaces(); i != num_interfaces; ++i) { - ObjPtr<mirror::Class> interface = mirror::Class::GetDirectInterface(self, klass, i); + ObjPtr<mirror::Class> interface = klass->GetDirectInterface(i); DCHECK(interface != nullptr); MaybeAddToImageClasses(self, interface, image_classes); } @@ -2468,7 +2468,7 @@ class InitializeClassVisitor : public CompilationVisitor { } // In this phase the classes containing class initializers are ignored. Make sure no - // clinit appears in kalss's super class chain and interfaces. + // clinit appears in klass's super class chain and interfaces. bool NoClinitInDependency(const Handle<mirror::Class>& klass, Thread* self, Handle<mirror::ClassLoader>* class_loader) @@ -2490,8 +2490,8 @@ class InitializeClassVisitor : public CompilationVisitor { uint32_t num_if = klass->NumDirectInterfaces(); for (size_t i = 0; i < num_if; i++) { - ObjPtr<mirror::Class> - interface = mirror::Class::GetDirectInterface(self, klass.Get(), i); + ObjPtr<mirror::Class> interface = klass->GetDirectInterface(i); + DCHECK(interface != nullptr); StackHandleScope<1> hs(self); Handle<mirror::Class> handle_interface(hs.NewHandle(interface)); if (!NoClinitInDependency(handle_interface, self, class_loader)) { |