From be509eecf12036db67e653cdc625e7118d4dc62f Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Tue, 10 Dec 2013 14:36:10 +0000 Subject: [PATCH] Properly restore the receiver after the interceptor call. R=dcarney@chromium.org Review URL: https://chromiumcodereview.appspot.com/108803006 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18289 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/stub-cache-arm.cc | 7 ++++--- src/ia32/stub-cache-ia32.cc | 10 ++++++---- src/x64/stub-cache-x64.cc | 10 ++++++---- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc index 5ee4803..4a25010 100644 --- a/src/arm/stub-cache-arm.cc +++ b/src/arm/stub-cache-arm.cc @@ -1089,12 +1089,13 @@ class CallInterceptorCompiler BASE_EMBEDDED { Label* interceptor_succeeded) { { FrameScope scope(masm, StackFrame::INTERNAL); - __ Push(holder, name_); + __ Push(receiver, holder, name_); CompileCallLoadPropertyWithInterceptor( masm, receiver, holder, name_, holder_obj, IC::kLoadPropertyWithInterceptorOnly); - __ pop(name_); // Restore the name. - __ pop(holder); // Restore the holder. + __ pop(receiver); + __ pop(name_); + __ pop(holder); } // If interceptor returns no-result sentinel, call the constant function. __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex); diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc index 34045d7..6ab3964 100644 --- a/src/ia32/stub-cache-ia32.cc +++ b/src/ia32/stub-cache-ia32.cc @@ -807,15 +807,17 @@ class CallInterceptorCompiler BASE_EMBEDDED { Label* interceptor_succeeded) { { FrameScope scope(masm, StackFrame::INTERNAL); - __ push(holder); // Save the holder. - __ push(name_); // Save the name. + __ push(receiver); + __ push(holder); + __ push(name_); CompileCallLoadPropertyWithInterceptor( masm, receiver, holder, name_, holder_obj, IC::kLoadPropertyWithInterceptorOnly); - __ pop(name_); // Restore the name. - __ pop(holder); // Restore the holder. + __ pop(name_); + __ pop(holder); + __ pop(receiver); // Leave the internal frame. } diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 5a1bbd8..950ee28 100644 --- a/src/x64/stub-cache-x64.cc +++ b/src/x64/stub-cache-x64.cc @@ -799,15 +799,17 @@ class CallInterceptorCompiler BASE_EMBEDDED { Label* interceptor_succeeded) { { FrameScope scope(masm, StackFrame::INTERNAL); - __ push(holder); // Save the holder. - __ push(name_); // Save the name. + __ push(receiver); + __ push(holder); + __ push(name_); CompileCallLoadPropertyWithInterceptor( masm, receiver, holder, name_, holder_obj, IC::kLoadPropertyWithInterceptorOnly); - __ pop(name_); // Restore the name. - __ pop(holder); // Restore the holder. + __ pop(name_); + __ pop(holder); + __ pop(receiver); // Leave the internal frame. } -- 2.7.4