OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 Label has_mapped_parameters, instantiate; | 667 Label has_mapped_parameters, instantiate; |
668 __ movp(rdi, Operand(rsi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 668 __ movp(rdi, Operand(rsi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
669 __ movp(rdi, FieldOperand(rdi, GlobalObject::kNativeContextOffset)); | 669 __ movp(rdi, FieldOperand(rdi, GlobalObject::kNativeContextOffset)); |
670 __ testp(rbx, rbx); | 670 __ testp(rbx, rbx); |
671 __ j(not_zero, &has_mapped_parameters, Label::kNear); | 671 __ j(not_zero, &has_mapped_parameters, Label::kNear); |
672 | 672 |
673 const int kIndex = Context::SLOPPY_ARGUMENTS_MAP_INDEX; | 673 const int kIndex = Context::SLOPPY_ARGUMENTS_MAP_INDEX; |
674 __ movp(rdi, Operand(rdi, Context::SlotOffset(kIndex))); | 674 __ movp(rdi, Operand(rdi, Context::SlotOffset(kIndex))); |
675 __ jmp(&instantiate, Label::kNear); | 675 __ jmp(&instantiate, Label::kNear); |
676 | 676 |
677 const int kAliasedIndex = Context::ALIASED_ARGUMENTS_MAP_INDEX; | 677 const int kAliasedIndex = Context::FAST_ALIASED_ARGUMENTS_MAP_INDEX; |
678 __ bind(&has_mapped_parameters); | 678 __ bind(&has_mapped_parameters); |
679 __ movp(rdi, Operand(rdi, Context::SlotOffset(kAliasedIndex))); | 679 __ movp(rdi, Operand(rdi, Context::SlotOffset(kAliasedIndex))); |
680 __ bind(&instantiate); | 680 __ bind(&instantiate); |
681 | 681 |
682 // rax = address of new object (tagged) | 682 // rax = address of new object (tagged) |
683 // rbx = mapped parameter count (untagged) | 683 // rbx = mapped parameter count (untagged) |
684 // rcx = argument count (untagged) | 684 // rcx = argument count (untagged) |
685 // rdi = address of arguments map (tagged) | 685 // rdi = address of arguments map (tagged) |
686 __ movp(FieldOperand(rax, JSObject::kMapOffset), rdi); | 686 __ movp(FieldOperand(rax, JSObject::kMapOffset), rdi); |
687 __ LoadRoot(kScratchRegister, Heap::kEmptyFixedArrayRootIndex); | 687 __ LoadRoot(kScratchRegister, Heap::kEmptyFixedArrayRootIndex); |
(...skipping 4735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5423 kStackSpace, nullptr, return_value_operand, NULL); | 5423 kStackSpace, nullptr, return_value_operand, NULL); |
5424 } | 5424 } |
5425 | 5425 |
5426 | 5426 |
5427 #undef __ | 5427 #undef __ |
5428 | 5428 |
5429 } // namespace internal | 5429 } // namespace internal |
5430 } // namespace v8 | 5430 } // namespace v8 |
5431 | 5431 |
5432 #endif // V8_TARGET_ARCH_X64 | 5432 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |