OLD | NEW |
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 Loading... |
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::kES5NativeByteOffset), | 676 __ testb(FieldOperand(rbx, SharedFunctionInfo::kNativeByteOffset), |
677 Immediate(1 << SharedFunctionInfo::kES5NativeBitWithinByte)); | 677 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte)); |
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 Loading... |
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::kES5NativeByteOffset), | 847 __ testb(FieldOperand(rdx, SharedFunctionInfo::kNativeByteOffset), |
848 Immediate(1 << SharedFunctionInfo::kES5NativeBitWithinByte)); | 848 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte)); |
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 Loading... |
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 |
OLD | NEW |