diff options
author | 2018-05-24 15:19:52 +0100 | |
---|---|---|
committer | 2018-05-25 11:37:45 +0100 | |
commit | c7aa87e1666ac48ddf9149cfdfd64b026b3969e5 (patch) | |
tree | 32d5d74718cc558e13642873e55724782ac9df22 /runtime/native/java_lang_Class.cc | |
parent | 0278be74269fcfe4f2517d449f2bd53472f9b2f9 (diff) |
Remove static_class_ from Method/VarHandle and CallSite.
And add MethodHandle to the class roots to avoid extra
indirection through MethodHandleImpl.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 31113334
Change-Id: Iaf172f3732677f2b4509e8297e6e9af5fb81a89f
Diffstat (limited to 'runtime/native/java_lang_Class.cc')
-rw-r--r-- | runtime/native/java_lang_Class.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/native/java_lang_Class.cc b/runtime/native/java_lang_Class.cc index 9f595b1c29..b7dad89106 100644 --- a/runtime/native/java_lang_Class.cc +++ b/runtime/native/java_lang_Class.cc @@ -22,6 +22,7 @@ #include "art_method-inl.h" #include "base/enums.h" #include "class_linker-inl.h" +#include "class_root.h" #include "common_throws.h" #include "dex/descriptors_names.h" #include "dex/dex_file-inl.h" @@ -82,7 +83,7 @@ static bool IsCallerTrusted(Thread* self) REQUIRES_SHARED(Locks::mutator_lock_) // is subject to change so conservatively cover the entire package. // NB Static initializers within java.lang.invoke are permitted and do not // need further stack inspection. - ObjPtr<mirror::Class> lookup_class = mirror::MethodHandlesLookup::StaticClass(); + ObjPtr<mirror::Class> lookup_class = GetClassRoot<mirror::MethodHandlesLookup>(); if ((declaring_class == lookup_class || declaring_class->IsInSamePackage(lookup_class)) && !m->IsClassInitializer()) { return true; |