| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 743 } | 743 } |
| 744 | 744 |
| 745 // Restore the function to rdi. | 745 // Restore the function to rdi. |
| 746 __ movq(rdi, Operand(rsp, rax, times_pointer_size, 1 * kPointerSize)); | 746 __ movq(rdi, Operand(rsp, rax, times_pointer_size, 1 * kPointerSize)); |
| 747 __ jmp(&patch_receiver, Label::kNear); | 747 __ jmp(&patch_receiver, Label::kNear); |
| 748 | 748 |
| 749 // Use the global receiver object from the called function as the | 749 // Use the global receiver object from the called function as the |
| 750 // receiver. | 750 // receiver. |
| 751 __ bind(&use_global_receiver); | 751 __ bind(&use_global_receiver); |
| 752 const int kGlobalIndex = | 752 const int kGlobalIndex = |
| 753 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; | 753 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; |
| 754 __ movq(rbx, FieldOperand(rsi, kGlobalIndex)); | 754 __ movq(rbx, FieldOperand(rsi, kGlobalIndex)); |
| 755 __ movq(rbx, FieldOperand(rbx, GlobalObject::kNativeContextOffset)); | 755 __ movq(rbx, FieldOperand(rbx, GlobalObject::kNativeContextOffset)); |
| 756 __ movq(rbx, FieldOperand(rbx, kGlobalIndex)); | 756 __ movq(rbx, FieldOperand(rbx, kGlobalIndex)); |
| 757 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); | 757 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); |
| 758 | 758 |
| 759 __ bind(&patch_receiver); | 759 __ bind(&patch_receiver); |
| 760 __ movq(Operand(rsp, rax, times_pointer_size, 0), rbx); | 760 __ movq(Operand(rsp, rax, times_pointer_size, 0), rbx); |
| 761 | 761 |
| 762 __ jmp(&shift_arguments); | 762 __ jmp(&shift_arguments); |
| 763 } | 763 } |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 // Convert the receiver to an object. | 928 // Convert the receiver to an object. |
| 929 __ bind(&call_to_object); | 929 __ bind(&call_to_object); |
| 930 __ push(rbx); | 930 __ push(rbx); |
| 931 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); | 931 __ InvokeBuiltin(Builtins::TO_OBJECT, CALL_FUNCTION); |
| 932 __ movq(rbx, rax); | 932 __ movq(rbx, rax); |
| 933 __ jmp(&push_receiver, Label::kNear); | 933 __ jmp(&push_receiver, Label::kNear); |
| 934 | 934 |
| 935 // Use the current global receiver object as the receiver. | 935 // Use the current global receiver object as the receiver. |
| 936 __ bind(&use_global_receiver); | 936 __ bind(&use_global_receiver); |
| 937 const int kGlobalOffset = | 937 const int kGlobalOffset = |
| 938 Context::kHeaderSize + Context::GLOBAL_INDEX * kPointerSize; | 938 Context::kHeaderSize + Context::GLOBAL_OBJECT_INDEX * kPointerSize; |
| 939 __ movq(rbx, FieldOperand(rsi, kGlobalOffset)); | 939 __ movq(rbx, FieldOperand(rsi, kGlobalOffset)); |
| 940 __ movq(rbx, FieldOperand(rbx, GlobalObject::kNativeContextOffset)); | 940 __ movq(rbx, FieldOperand(rbx, GlobalObject::kNativeContextOffset)); |
| 941 __ movq(rbx, FieldOperand(rbx, kGlobalOffset)); | 941 __ movq(rbx, FieldOperand(rbx, kGlobalOffset)); |
| 942 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); | 942 __ movq(rbx, FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); |
| 943 | 943 |
| 944 // Push the receiver. | 944 // Push the receiver. |
| 945 __ bind(&push_receiver); | 945 __ bind(&push_receiver); |
| 946 __ push(rbx); | 946 __ push(rbx); |
| 947 | 947 |
| 948 // Copy all arguments from the array to the stack. | 948 // Copy all arguments from the array to the stack. |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1776 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1776 Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); |
| 1777 generator.Generate(); | 1777 generator.Generate(); |
| 1778 } | 1778 } |
| 1779 | 1779 |
| 1780 | 1780 |
| 1781 #undef __ | 1781 #undef __ |
| 1782 | 1782 |
| 1783 } } // namespace v8::internal | 1783 } } // namespace v8::internal |
| 1784 | 1784 |
| 1785 #endif // V8_TARGET_ARCH_X64 | 1785 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |