| 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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); | 668 __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); |
| 669 | 669 |
| 670 // Do not transform the receiver for strict mode functions. | 670 // Do not transform the receiver for strict mode functions. |
| 671 __ movq(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); | 671 __ movq(rbx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
| 672 __ testb(FieldOperand(rbx, SharedFunctionInfo::kStrictModeByteOffset), | 672 __ testb(FieldOperand(rbx, SharedFunctionInfo::kStrictModeByteOffset), |
| 673 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte)); | 673 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte)); |
| 674 __ j(not_equal, &shift_arguments); | 674 __ j(not_equal, &shift_arguments); |
| 675 | 675 |
| 676 // Do not transform the receiver for natives. | 676 // Do not transform the receiver for natives. |
| 677 // SharedFunctionInfo is already loaded into rbx. | 677 // SharedFunctionInfo is already loaded into rbx. |
| 678 __ testb(FieldOperand(rbx, SharedFunctionInfo::kES5NativeByteOffset), | 678 __ testb(FieldOperand(rbx, SharedFunctionInfo::kNativeByteOffset), |
| 679 Immediate(1 << SharedFunctionInfo::kES5NativeBitWithinByte)); | 679 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte)); |
| 680 __ j(not_zero, &shift_arguments); | 680 __ j(not_zero, &shift_arguments); |
| 681 | 681 |
| 682 // Compute the receiver in non-strict mode. | 682 // Compute the receiver in non-strict mode. |
| 683 __ movq(rbx, Operand(rsp, rax, times_pointer_size, 0)); | 683 __ movq(rbx, Operand(rsp, rax, times_pointer_size, 0)); |
| 684 __ JumpIfSmi(rbx, &convert_to_object, Label::kNear); | 684 __ JumpIfSmi(rbx, &convert_to_object, Label::kNear); |
| 685 | 685 |
| 686 __ CompareRoot(rbx, Heap::kNullValueRootIndex); | 686 __ CompareRoot(rbx, Heap::kNullValueRootIndex); |
| 687 __ j(equal, &use_global_receiver); | 687 __ j(equal, &use_global_receiver); |
| 688 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); | 688 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); |
| 689 __ j(equal, &use_global_receiver); | 689 __ j(equal, &use_global_receiver); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 Label call_to_object, use_global_receiver, push_receiver; | 840 Label call_to_object, use_global_receiver, push_receiver; |
| 841 __ movq(rbx, Operand(rbp, kReceiverOffset)); | 841 __ movq(rbx, Operand(rbp, kReceiverOffset)); |
| 842 | 842 |
| 843 // Do not transform the receiver for strict mode functions. | 843 // Do not transform the receiver for strict mode functions. |
| 844 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); | 844 __ movq(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
| 845 __ testb(FieldOperand(rdx, SharedFunctionInfo::kStrictModeByteOffset), | 845 __ testb(FieldOperand(rdx, SharedFunctionInfo::kStrictModeByteOffset), |
| 846 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte)); | 846 Immediate(1 << SharedFunctionInfo::kStrictModeBitWithinByte)); |
| 847 __ j(not_equal, &push_receiver); | 847 __ j(not_equal, &push_receiver); |
| 848 | 848 |
| 849 // Do not transform the receiver for natives. | 849 // Do not transform the receiver for natives. |
| 850 __ testb(FieldOperand(rdx, SharedFunctionInfo::kES5NativeByteOffset), | 850 __ testb(FieldOperand(rdx, SharedFunctionInfo::kNativeByteOffset), |
| 851 Immediate(1 << SharedFunctionInfo::kES5NativeBitWithinByte)); | 851 Immediate(1 << SharedFunctionInfo::kNativeBitWithinByte)); |
| 852 __ j(not_zero, &push_receiver); | 852 __ j(not_zero, &push_receiver); |
| 853 | 853 |
| 854 // Compute the receiver in non-strict mode. | 854 // Compute the receiver in non-strict mode. |
| 855 __ JumpIfSmi(rbx, &call_to_object, Label::kNear); | 855 __ JumpIfSmi(rbx, &call_to_object, Label::kNear); |
| 856 __ CompareRoot(rbx, Heap::kNullValueRootIndex); | 856 __ CompareRoot(rbx, Heap::kNullValueRootIndex); |
| 857 __ j(equal, &use_global_receiver); | 857 __ j(equal, &use_global_receiver); |
| 858 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); | 858 __ CompareRoot(rbx, Heap::kUndefinedValueRootIndex); |
| 859 __ j(equal, &use_global_receiver); | 859 __ j(equal, &use_global_receiver); |
| 860 | 860 |
| 861 // If given receiver is already a JavaScript object then there's no | 861 // If given receiver is already a JavaScript object then there's no |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1515 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1515 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
| 1516 generator.Generate(); | 1516 generator.Generate(); |
| 1517 } | 1517 } |
| 1518 | 1518 |
| 1519 | 1519 |
| 1520 #undef __ | 1520 #undef __ |
| 1521 | 1521 |
| 1522 } } // namespace v8::internal | 1522 } } // namespace v8::internal |
| 1523 | 1523 |
| 1524 #endif // V8_TARGET_ARCH_X64 | 1524 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |