Commit be509eec authored by verwaest@chromium.org's avatar verwaest@chromium.org

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
parent dbf5be00
...@@ -1089,12 +1089,13 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -1089,12 +1089,13 @@ class CallInterceptorCompiler BASE_EMBEDDED {
Label* interceptor_succeeded) { Label* interceptor_succeeded) {
{ {
FrameScope scope(masm, StackFrame::INTERNAL); FrameScope scope(masm, StackFrame::INTERNAL);
__ Push(holder, name_); __ Push(receiver, holder, name_);
CompileCallLoadPropertyWithInterceptor( CompileCallLoadPropertyWithInterceptor(
masm, receiver, holder, name_, holder_obj, masm, receiver, holder, name_, holder_obj,
IC::kLoadPropertyWithInterceptorOnly); IC::kLoadPropertyWithInterceptorOnly);
__ pop(name_); // Restore the name. __ pop(receiver);
__ pop(holder); // Restore the holder. __ pop(name_);
__ pop(holder);
} }
// If interceptor returns no-result sentinel, call the constant function. // If interceptor returns no-result sentinel, call the constant function.
__ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex); __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex);
......
...@@ -807,15 +807,17 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -807,15 +807,17 @@ class CallInterceptorCompiler BASE_EMBEDDED {
Label* interceptor_succeeded) { Label* interceptor_succeeded) {
{ {
FrameScope scope(masm, StackFrame::INTERNAL); FrameScope scope(masm, StackFrame::INTERNAL);
__ push(holder); // Save the holder. __ push(receiver);
__ push(name_); // Save the name. __ push(holder);
__ push(name_);
CompileCallLoadPropertyWithInterceptor( CompileCallLoadPropertyWithInterceptor(
masm, receiver, holder, name_, holder_obj, masm, receiver, holder, name_, holder_obj,
IC::kLoadPropertyWithInterceptorOnly); IC::kLoadPropertyWithInterceptorOnly);
__ pop(name_); // Restore the name. __ pop(name_);
__ pop(holder); // Restore the holder. __ pop(holder);
__ pop(receiver);
// Leave the internal frame. // Leave the internal frame.
} }
......
...@@ -799,15 +799,17 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -799,15 +799,17 @@ class CallInterceptorCompiler BASE_EMBEDDED {
Label* interceptor_succeeded) { Label* interceptor_succeeded) {
{ {
FrameScope scope(masm, StackFrame::INTERNAL); FrameScope scope(masm, StackFrame::INTERNAL);
__ push(holder); // Save the holder. __ push(receiver);
__ push(name_); // Save the name. __ push(holder);
__ push(name_);
CompileCallLoadPropertyWithInterceptor( CompileCallLoadPropertyWithInterceptor(
masm, receiver, holder, name_, holder_obj, masm, receiver, holder, name_, holder_obj,
IC::kLoadPropertyWithInterceptorOnly); IC::kLoadPropertyWithInterceptorOnly);
__ pop(name_); // Restore the name. __ pop(name_);
__ pop(holder); // Restore the holder. __ pop(holder);
__ pop(receiver);
// Leave the internal frame. // Leave the internal frame.
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment