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

Side by Side Diff: src/x64/builtins-x64.cc

Issue 7071009: Revert "Pass undefined to JS builtins when called with implicit receiver." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/v8natives.js ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); 666 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
667 667
668 // Do not transform the receiver for strict mode functions. 668 // Do not transform the receiver for strict mode functions.
669 __ movq(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 669 __ movq(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
670 __ testb(FieldOperand(rbx, SharedFunctionInfo::kStrictModeByteOffset), 670 __ testb(FieldOperand(rbx, SharedFunctionInfo::kStrictModeByteOffset),
671 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte)); 671 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte));
672 __ j(not_equal, &shift_arguments); 672 __ j(not_equal, &shift_arguments);
673 673
674 // Do not transform the receiver for natives. 674 // Do not transform the receiver for natives.
675 // SharedFunctionInfo is already loaded into rbx. 675 // SharedFunctionInfo is already loaded into rbx.
676 __ testb(FieldOperand(rbx, SharedFunctionInfo::kNativeByteOffset), 676 __ testb(FieldOperand(rbx, SharedFunctionInfo::kES5NativeByteOffset),
677 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte)); 677 Immediate(1 << SharedFunctionInfo::kES5NativeBitWithinByte));
678 __ j(not_zero, &shift_arguments); 678 __ j(not_zero, &shift_arguments);
679 679
680 // Compute the receiver in non-strict mode. 680 // Compute the receiver in non-strict mode.
681 __ movq(rbx, Operand(rsp, rax, times_pointer_size, 0)); 681 __ movq(rbx, Operand(rsp, rax, times_pointer_size, 0));
682 __ JumpIfSmi(rbx, &convert_to_object, Label::kNear); 682 __ JumpIfSmi(rbx, &convert_to_object, Label::kNear);
683 683
684 __ CompareRoot(rbx, Heap::kNullValueRootIndex); 684 __ CompareRoot(rbx, Heap::kNullValueRootIndex);
685 __ j(equal, &use_global_receiver); 685 __ j(equal, &use_global_receiver);
686 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); 686 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex);
687 __ j(equal, &use_global_receiver); 687 __ j(equal, &use_global_receiver);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 Label call_to_object, use_global_receiver, push_receiver; 837 Label call_to_object, use_global_receiver, push_receiver;
838 __ movq(rbx, Operand(rbp, kReceiverOffset)); 838 __ movq(rbx, Operand(rbp, kReceiverOffset));
839 839
840 // Do not transform the receiver for strict mode functions. 840 // Do not transform the receiver for strict mode functions.
841 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); 841 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset));
842 __ testb(FieldOperand(rdx, SharedFunctionInfo::kStrictModeByteOffset), 842 __ testb(FieldOperand(rdx, SharedFunctionInfo::kStrictModeByteOffset),
843 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte)); 843 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte));
844 __ j(not_equal, &push_receiver); 844 __ j(not_equal, &push_receiver);
845 845
846 // Do not transform the receiver for natives. 846 // Do not transform the receiver for natives.
847 __ testb(FieldOperand(rdx, SharedFunctionInfo::kNativeByteOffset), 847 __ testb(FieldOperand(rdx, SharedFunctionInfo::kES5NativeByteOffset),
848 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte)); 848 Immediate(1 << SharedFunctionInfo::kES5NativeBitWithinByte));
849 __ j(not_zero, &push_receiver); 849 __ j(not_zero, &push_receiver);
850 850
851 // Compute the receiver in non-strict mode. 851 // Compute the receiver in non-strict mode.
852 __ JumpIfSmi(rbx, &call_to_object, Label::kNear); 852 __ JumpIfSmi(rbx, &call_to_object, Label::kNear);
853 __ CompareRoot(rbx, Heap::kNullValueRootIndex); 853 __ CompareRoot(rbx, Heap::kNullValueRootIndex);
854 __ j(equal, &use_global_receiver); 854 __ j(equal, &use_global_receiver);
855 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); 855 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex);
856 __ j(equal, &use_global_receiver); 856 __ j(equal, &use_global_receiver);
857 857
858 // If given receiver is already a JavaScript object then there's no 858 // If given receiver is already a JavaScript object then there's no
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); 1511 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR);
1512 generator.Generate(); 1512 generator.Generate();
1513 } 1513 }
1514 1514
1515 1515
1516 #undef __ 1516 #undef __
1517 1517
1518 } } // namespace v8::internal 1518 } } // namespace v8::internal
1519 1519
1520 #endif // V8_TARGET_ARCH_X64 1520 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/v8natives.js ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698