summaryrefslogtreecommitdiffstats
path: root/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-05-22 16:48:55 -0700
committerMathieu Chartier <mathieuc@google.com>2014-05-23 12:55:45 -0700
commit0cd81352a7c06e381951cea1b104fd73516f4341 (patch)
treefcc8ff9cdeb608d0913097aa1fb64d1879f11ffa /runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
parentdfd301f19800a4f168283cf2d0b15b2c09071955 (diff)
downloadart-0cd81352a7c06e381951cea1b104fd73516f4341.tar.gz
art-0cd81352a7c06e381951cea1b104fd73516f4341.tar.bz2
art-0cd81352a7c06e381951cea1b104fd73516f4341.zip
Revert "Revert "Fix an outstanding compaction bug in interpreter.""
Fixed the generic trampoline to not use ToJObject when unnecessary. Bug: 15167269 This reverts commit 3bdb873122964da7937eb070cbcf2ef638a8e459. Change-Id: I0525d0e0f3afb753c770e1572070a0fa22b02271
Diffstat (limited to 'runtime/entrypoints/portable/portable_trampoline_entrypoints.cc')
-rw-r--r--runtime/entrypoints/portable/portable_trampoline_entrypoints.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc b/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
index 17c3222ff1..3756f47311 100644
--- a/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/portable/portable_trampoline_entrypoints.cc
@@ -317,11 +317,11 @@ extern "C" uint64_t artPortableProxyInvokeHandler(mirror::ArtMethod* proxy_metho
// Lazily resolve a method for portable. Called by stub code.
extern "C" const void* artPortableResolutionTrampoline(mirror::ArtMethod* called,
mirror::Object* receiver,
- Thread* thread,
+ Thread* self,
mirror::ArtMethod** called_addr)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
uint32_t dex_pc;
- mirror::ArtMethod* caller = thread->GetCurrentMethod(&dex_pc);
+ mirror::ArtMethod* caller = self->GetCurrentMethod(&dex_pc);
ClassLinker* linker = Runtime::Current()->GetClassLinker();
InvokeType invoke_type;
@@ -379,7 +379,7 @@ extern "C" const void* artPortableResolutionTrampoline(mirror::ArtMethod* called
is_range = true;
}
uint32_t dex_method_idx = (is_range) ? instr->VRegB_3rc() : instr->VRegB_35c();
- called = linker->ResolveMethod(dex_method_idx, caller, invoke_type);
+ called = linker->ResolveMethod(Thread::Current(), dex_method_idx, &caller, invoke_type);
// Incompatible class change should have been handled in resolve method.
CHECK(!called->CheckIncompatibleClassChange(invoke_type));
// Refine called method based on receiver.
@@ -395,9 +395,9 @@ extern "C" const void* artPortableResolutionTrampoline(mirror::ArtMethod* called
CHECK(!called->CheckIncompatibleClassChange(invoke_type));
}
const void* code = nullptr;
- if (LIKELY(!thread->IsExceptionPending())) {
+ if (LIKELY(!self->IsExceptionPending())) {
// Ensure that the called method's class is initialized.
- StackHandleScope<1> hs(Thread::Current());
+ StackHandleScope<1> hs(self);
Handle<mirror::Class> called_class(hs.NewHandle(called->GetDeclaringClass()));
linker->EnsureInitialized(called_class, true, true);
if (LIKELY(called_class->IsInitialized())) {