Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: src/x64/builtins-x64.cc

Issue 6928007: Reapply 7763, including arm and x64 variants. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/x64/builtins-x64.cc
===================================================================
--- src/x64/builtins-x64.cc (revision 7763)
+++ src/x64/builtins-x64.cc (working copy)
@@ -658,6 +658,15 @@
Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte));
__ j(not_equal, &shift_arguments);
+ // Do not transform the receiver for natives (shared already in ebx).
Lasse Reichstein 2011/05/04 07:34:08 More verbose comments: (SharedFunctionInfo is alre
+ __ movq(rbx, FieldOperand(rbx, SharedFunctionInfo::kScriptOffset));
+ __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex);
Lasse Reichstein 2011/05/04 07:34:08 Create a bug for handling non-native functions wit
Rico 2011/05/04 08:42:18 Don issue 1366
+ __ j(equal, &shift_arguments);
+ __ movq(rbx, FieldOperand(rbx, Script::kTypeOffset));
+ __ SmiToInteger32(rbx, rbx);
Lasse Reichstein 2011/05/04 07:34:08 Use __ SmiToInteger32(rbx, FieldOperand(rbx, Scr
Rico 2011/05/04 08:42:18 Done.
+ __ cmpq(rbx, Immediate(Script::TYPE_NATIVE));
Lasse Reichstein 2011/05/04 07:34:08 Should have been cmpl.
Rico 2011/05/04 08:42:18 Using SmiCompare instead
+ __ j(equal, &shift_arguments);
+
// Compute the receiver in non-strict mode.
__ movq(rbx, Operand(rsp, rax, times_pointer_size, 0));
__ JumpIfSmi(rbx, &convert_to_object);
@@ -822,6 +831,15 @@
Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte));
__ j(not_equal, &push_receiver);
+ // Do not transform the receiver for natives (shared already in rdx).
+ __ movq(rdx, FieldOperand(rdx, SharedFunctionInfo::kScriptOffset));
+ __ CompareRoot(rdx, Heap::kUndefinedValueRootIndex);
+ __ j(equal, &push_receiver);
+ __ movq(rdx, FieldOperand(rdx, Script::kTypeOffset));
+ __ SmiToInteger32(rdx, rdx);
+ __ cmpq(rdx, Immediate(Script::TYPE_NATIVE));
+ __ j(equal, &push_receiver);
+
// Compute the receiver in non-strict mode.
__ JumpIfSmi(rbx, &call_to_object);
__ CompareRoot(rbx, Heap::kNullValueRootIndex);

Powered by Google App Engine
This is Rietveld 408576698