Reviewers: dcarney,

Message:
PTAL

Description:
Fix patching the receiver (global object -> global proxy) after the interceptor.

This is a temporary fix that will be replaced by loading the proxy from the
target function.

Please review this at https://chromiumcodereview.appspot.com/108913006/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+9, -9 lines):
  M src/arm/stub-cache-arm.cc
  M src/ia32/stub-cache-ia32.cc
  M src/x64/stub-cache-x64.cc


Index: src/arm/stub-cache-arm.cc
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc
index 9d1418bf81d89b626aca06750de6a6976913a8e3..5ee48035986cf6b2fd515bc29492af64b53241be 100644
--- a/src/arm/stub-cache-arm.cc
+++ b/src/arm/stub-cache-arm.cc
@@ -1019,7 +1019,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
     // holder haven't changed and thus we can use cached constant function.
     if (*interceptor_holder != lookup->holder()) {
       stub_compiler_->CheckPrototypes(
-          IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver,
+          IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder,
           handle(lookup->holder()), scratch1, scratch2, scratch3,
           name, depth2, miss);
     } else {
@@ -1036,7 +1036,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
           masm, optimization, arguments_.immediate(), false);
     } else {
       Handle<JSFunction> function = optimization.constant_function();
-      stub_compiler_->GenerateJumpFunctionIgnoreReceiver(function);
+      stub_compiler_->GenerateJumpFunction(object, function);
     }

     // Deferred code for fast API call case---clean preallocated space.
@@ -1094,7 +1094,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
           masm, receiver, holder, name_, holder_obj,
           IC::kLoadPropertyWithInterceptorOnly);
       __ pop(name_);  // Restore the name.
-      __ pop(receiver);  // Restore the holder.
+      __ pop(holder);  // Restore the holder.
     }
// If interceptor returns no-result sentinel, call the constant function.
     __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex);
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index 88923c308e90f2a53a20e227a7dd37550830f1f4..34045d74de315c1428fce6c5fef069ba9d2aa70d 100644
--- a/src/ia32/stub-cache-ia32.cc
+++ b/src/ia32/stub-cache-ia32.cc
@@ -739,7 +739,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
     // holder haven't changed and thus we can use cached constant function.
     if (*interceptor_holder != lookup->holder()) {
       stub_compiler_->CheckPrototypes(
-          IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver,
+          IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder,
           handle(lookup->holder()), scratch1, scratch2, scratch3,
           name, depth2, miss);
     } else {
@@ -755,7 +755,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
       GenerateFastApiCall(masm, optimization, arguments_.immediate());
     } else {
       Handle<JSFunction> fun = optimization.constant_function();
-      stub_compiler_->GenerateJumpFunctionIgnoreReceiver(fun);
+      stub_compiler_->GenerateJumpFunction(object, fun);
     }

     // Deferred code for fast API call case---clean preallocated space.
@@ -815,7 +815,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
           IC::kLoadPropertyWithInterceptorOnly);

       __ pop(name_);  // Restore the name.
-      __ pop(receiver);  // Restore the holder.
+      __ pop(holder);  // Restore the holder.
       // Leave the internal frame.
     }

Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index 9cfcf46c9da2ceffc4acc7bd106e28fdd0bc2558..5a1bbd81829d03a2cbb26a88d67c70d8fb0c9522 100644
--- a/src/x64/stub-cache-x64.cc
+++ b/src/x64/stub-cache-x64.cc
@@ -731,7 +731,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
     // holder haven't changed and thus we can use cached constant function.
     if (*interceptor_holder != lookup->holder()) {
       stub_compiler_->CheckPrototypes(
-          IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver,
+          IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder,
           handle(lookup->holder()), scratch1, scratch2, scratch3,
           name, depth2, miss);
     } else {
@@ -747,7 +747,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
       GenerateFastApiCall(masm, optimization, arguments_.immediate());
     } else {
       Handle<JSFunction> fun = optimization.constant_function();
-      stub_compiler_->GenerateJumpFunctionIgnoreReceiver(fun);
+      stub_compiler_->GenerateJumpFunction(object, fun);
     }

     // Deferred code for fast API call case---clean preallocated space.
@@ -807,7 +807,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
           IC::kLoadPropertyWithInterceptorOnly);

       __ pop(name_);  // Restore the name.
-      __ pop(receiver);  // Restore the holder.
+      __ pop(holder);  // Restore the holder.
       // Leave the internal frame.
     }



--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to