Reviewers: dcarney,
Message:
PTAL
Description:
Properly restore the receiver after the interceptor call.
Please review this at https://chromiumcodereview.appspot.com/108803006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+16, -11 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
5ee48035986cf6b2fd515bc29492af64b53241be..4a2501092a247d5c6cbfabdfddfa43f60da8d859
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);
Index: src/ia32/stub-cache-ia32.cc
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
index
34045d74de315c1428fce6c5fef069ba9d2aa70d..6ab3964b80f75b469e0004d32c0ee75d82e00278
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.
}
Index: src/x64/stub-cache-x64.cc
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
index
5a1bbd81829d03a2cbb26a88d67c70d8fb0c9522..950ee28e1c4f1609e03378535b1fdcf26cbbc202
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.
}
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.