OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 2686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2697 __ lw(t1, FieldMemOperand(a2, AllocationSite::kMapOffset)); | 2697 __ lw(t1, FieldMemOperand(a2, AllocationSite::kMapOffset)); |
2698 __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex); | 2698 __ LoadRoot(at, Heap::kAllocationSiteMapRootIndex); |
2699 __ Branch(&feedback_register_initialized, eq, t1, Operand(at)); | 2699 __ Branch(&feedback_register_initialized, eq, t1, Operand(at)); |
2700 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); | 2700 __ LoadRoot(a2, Heap::kUndefinedValueRootIndex); |
2701 __ bind(&feedback_register_initialized); | 2701 __ bind(&feedback_register_initialized); |
2702 } | 2702 } |
2703 | 2703 |
2704 __ AssertUndefinedOrAllocationSite(a2, t1); | 2704 __ AssertUndefinedOrAllocationSite(a2, t1); |
2705 } | 2705 } |
2706 | 2706 |
| 2707 // Pass function as original constructor. |
| 2708 __ mov(a3, a1); |
| 2709 |
2707 // Jump to the function-specific construct stub. | 2710 // Jump to the function-specific construct stub. |
2708 Register jmp_reg = t0; | 2711 Register jmp_reg = t0; |
2709 __ lw(jmp_reg, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); | 2712 __ lw(jmp_reg, FieldMemOperand(a1, JSFunction::kSharedFunctionInfoOffset)); |
2710 __ lw(jmp_reg, FieldMemOperand(jmp_reg, | 2713 __ lw(jmp_reg, FieldMemOperand(jmp_reg, |
2711 SharedFunctionInfo::kConstructStubOffset)); | 2714 SharedFunctionInfo::kConstructStubOffset)); |
2712 __ Addu(at, jmp_reg, Operand(Code::kHeaderSize - kHeapObjectTag)); | 2715 __ Addu(at, jmp_reg, Operand(Code::kHeaderSize - kHeapObjectTag)); |
2713 __ Jump(at); | 2716 __ Jump(at); |
2714 | 2717 |
2715 // a0: number of arguments | 2718 // a0: number of arguments |
2716 // a1: called object | 2719 // a1: called object |
(...skipping 2422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5139 kStackUnwindSpace, NULL, | 5142 kStackUnwindSpace, NULL, |
5140 MemOperand(fp, 6 * kPointerSize), NULL); | 5143 MemOperand(fp, 6 * kPointerSize), NULL); |
5141 } | 5144 } |
5142 | 5145 |
5143 | 5146 |
5144 #undef __ | 5147 #undef __ |
5145 | 5148 |
5146 } } // namespace v8::internal | 5149 } } // namespace v8::internal |
5147 | 5150 |
5148 #endif // V8_TARGET_ARCH_MIPS | 5151 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |