diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2014-10-06 10:46:14 -0700 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2014-10-06 10:47:18 -0700 |
commit | 5ad97daa3112ca626e3fbf2bf08971977344c3c3 (patch) | |
tree | a470901bdeea004fd2ef526241853a167b1c0a02 /runtime/interpreter/interpreter.cc | |
parent | 72f961813dcb915542b9ae957aed040082d3e40a (diff) | |
download | art-5ad97daa3112ca626e3fbf2bf08971977344c3c3.tar.gz art-5ad97daa3112ca626e3fbf2bf08971977344c3c3.tar.bz2 art-5ad97daa3112ca626e3fbf2bf08971977344c3c3.zip |
Handlerize methods across some GC points.
Bug: 12687968
Change-Id: I0d5b0a78488ba76db4d25991d8db95b24bb624e9
Diffstat (limited to 'runtime/interpreter/interpreter.cc')
-rw-r--r-- | runtime/interpreter/interpreter.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc index 07224efbf..8fb1712eb 100644 --- a/runtime/interpreter/interpreter.cc +++ b/runtime/interpreter/interpreter.cc @@ -529,10 +529,10 @@ extern "C" void artInterpreterToInterpreterBridge(Thread* self, MethodHelper& mh } self->PushShadowFrame(shadow_frame); - ArtMethod* method = shadow_frame->GetMethod(); + DCHECK_EQ(shadow_frame->GetMethod(), mh.Get()); // Ensure static methods are initialized. - if (method->IsStatic()) { - mirror::Class* declaring_class = method->GetDeclaringClass(); + if (mh.Get()->IsStatic()) { + mirror::Class* declaring_class = mh.Get()->GetDeclaringClass(); if (UNLIKELY(!declaring_class->IsInitialized())) { StackHandleScope<1> hs(self); HandleWrapper<Class> h_declaring_class(hs.NewHandleWrapper(&declaring_class)); @@ -546,15 +546,15 @@ extern "C" void artInterpreterToInterpreterBridge(Thread* self, MethodHelper& mh } } - if (LIKELY(!method->IsNative())) { + if (LIKELY(!mh.Get()->IsNative())) { result->SetJ(Execute(self, mh, code_item, *shadow_frame, JValue()).GetJ()); } else { // We don't expect to be asked to interpret native code (which is entered via a JNI compiler // generated stub) except during testing and image writing. CHECK(!Runtime::Current()->IsStarted()); - Object* receiver = method->IsStatic() ? nullptr : shadow_frame->GetVRegReference(0); - uint32_t* args = shadow_frame->GetVRegArgs(method->IsStatic() ? 0 : 1); - UnstartedRuntimeJni(self, method, receiver, args, result); + Object* receiver = mh.Get()->IsStatic() ? nullptr : shadow_frame->GetVRegReference(0); + uint32_t* args = shadow_frame->GetVRegArgs(mh.Get()->IsStatic() ? 0 : 1); + UnstartedRuntimeJni(self, mh.Get(), receiver, args, result); } self->PopShadowFrame(); |