Commit 7ee571be authored by verwaest@chromium.org's avatar verwaest@chromium.org

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.

R=dcarney@chromium.org

Review URL: https://chromiumcodereview.appspot.com/108913006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18286 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d9e07635
...@@ -1019,7 +1019,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -1019,7 +1019,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
// holder haven't changed and thus we can use cached constant function. // holder haven't changed and thus we can use cached constant function.
if (*interceptor_holder != lookup->holder()) { if (*interceptor_holder != lookup->holder()) {
stub_compiler_->CheckPrototypes( stub_compiler_->CheckPrototypes(
IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver, IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder,
handle(lookup->holder()), scratch1, scratch2, scratch3, handle(lookup->holder()), scratch1, scratch2, scratch3,
name, depth2, miss); name, depth2, miss);
} else { } else {
...@@ -1036,7 +1036,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -1036,7 +1036,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
masm, optimization, arguments_.immediate(), false); masm, optimization, arguments_.immediate(), false);
} else { } else {
Handle<JSFunction> function = optimization.constant_function(); 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. // Deferred code for fast API call case---clean preallocated space.
...@@ -1094,7 +1094,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -1094,7 +1094,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
masm, receiver, holder, name_, holder_obj, masm, receiver, holder, name_, holder_obj,
IC::kLoadPropertyWithInterceptorOnly); IC::kLoadPropertyWithInterceptorOnly);
__ pop(name_); // Restore the name. __ 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. // If interceptor returns no-result sentinel, call the constant function.
__ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex); __ LoadRoot(scratch, Heap::kNoInterceptorResultSentinelRootIndex);
......
...@@ -739,7 +739,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -739,7 +739,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
// holder haven't changed and thus we can use cached constant function. // holder haven't changed and thus we can use cached constant function.
if (*interceptor_holder != lookup->holder()) { if (*interceptor_holder != lookup->holder()) {
stub_compiler_->CheckPrototypes( stub_compiler_->CheckPrototypes(
IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver, IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder,
handle(lookup->holder()), scratch1, scratch2, scratch3, handle(lookup->holder()), scratch1, scratch2, scratch3,
name, depth2, miss); name, depth2, miss);
} else { } else {
...@@ -755,7 +755,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -755,7 +755,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
GenerateFastApiCall(masm, optimization, arguments_.immediate()); GenerateFastApiCall(masm, optimization, arguments_.immediate());
} else { } else {
Handle<JSFunction> fun = optimization.constant_function(); 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. // Deferred code for fast API call case---clean preallocated space.
...@@ -815,7 +815,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -815,7 +815,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
IC::kLoadPropertyWithInterceptorOnly); IC::kLoadPropertyWithInterceptorOnly);
__ pop(name_); // Restore the name. __ pop(name_); // Restore the name.
__ pop(receiver); // Restore the holder. __ pop(holder); // Restore the holder.
// Leave the internal frame. // Leave the internal frame.
} }
......
...@@ -731,7 +731,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -731,7 +731,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
// holder haven't changed and thus we can use cached constant function. // holder haven't changed and thus we can use cached constant function.
if (*interceptor_holder != lookup->holder()) { if (*interceptor_holder != lookup->holder()) {
stub_compiler_->CheckPrototypes( stub_compiler_->CheckPrototypes(
IC::CurrentTypeOf(interceptor_holder, masm->isolate()), receiver, IC::CurrentTypeOf(interceptor_holder, masm->isolate()), holder,
handle(lookup->holder()), scratch1, scratch2, scratch3, handle(lookup->holder()), scratch1, scratch2, scratch3,
name, depth2, miss); name, depth2, miss);
} else { } else {
...@@ -747,7 +747,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -747,7 +747,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
GenerateFastApiCall(masm, optimization, arguments_.immediate()); GenerateFastApiCall(masm, optimization, arguments_.immediate());
} else { } else {
Handle<JSFunction> fun = optimization.constant_function(); 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. // Deferred code for fast API call case---clean preallocated space.
...@@ -807,7 +807,7 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -807,7 +807,7 @@ class CallInterceptorCompiler BASE_EMBEDDED {
IC::kLoadPropertyWithInterceptorOnly); IC::kLoadPropertyWithInterceptorOnly);
__ pop(name_); // Restore the name. __ pop(name_); // Restore the name.
__ pop(receiver); // Restore the holder. __ pop(holder); // Restore the holder.
// 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