From 2efb0aa57da168944f99a2d13aed2a426cfa76e7 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Tue, 15 Dec 2015 22:15:34 +0000 Subject: Revert "Combine direct_methods_ and virtual_methods_ fields of mirror::Class" This reverts commit 9539150b85142c18e9e8c2264b5b6100942667c3. Change-Id: I596876cd643ec0ad524a56621efb6b89e8886230 --- runtime/entrypoints/entrypoint_utils.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'runtime/entrypoints/entrypoint_utils.cc') diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc index 915d9ab5e7..87e29ae3c3 100644 --- a/runtime/entrypoints/entrypoint_utils.cc +++ b/runtime/entrypoints/entrypoint_utils.cc @@ -306,13 +306,11 @@ JValue InvokeProxyInvocationHandler(ScopedObjectAccessAlreadyRunnable& soa, cons mirror::Method* interface_method = soa.Decode(interface_method_jobj); ArtMethod* proxy_method = rcvr->GetClass()->FindVirtualMethodForInterface( interface_method->GetArtMethod(), sizeof(void*)); - auto virtual_methods = proxy_class->GetVirtualMethodsSlice(sizeof(void*)); + auto* virtual_methods = proxy_class->GetVirtualMethodsPtr(); size_t num_virtuals = proxy_class->NumVirtualMethods(); size_t method_size = ArtMethod::Size(sizeof(void*)); - // Rely on the fact that the methods are contiguous to determine the index of the method in - // the slice. int throws_index = (reinterpret_cast(proxy_method) - - reinterpret_cast(&virtual_methods.At(0))) / method_size; + reinterpret_cast(virtual_methods)) / method_size; CHECK_LT(throws_index, static_cast(num_virtuals)); mirror::ObjectArray* declared_exceptions = proxy_class->GetThrows()->Get(throws_index); -- cgit v1.2.3-59-g8ed1b