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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 4116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4127 __ bind(&done); | 4127 __ bind(&done); |
4128 | 4128 |
4129 context()->Plug(v0); | 4129 context()->Plug(v0); |
4130 } | 4130 } |
4131 | 4131 |
4132 | 4132 |
4133 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { | 4133 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
4134 ZoneList<Expression*>* args = expr->arguments(); | 4134 ZoneList<Expression*>* args = expr->arguments(); |
4135 DCHECK(args->length() == 2); | 4135 DCHECK(args->length() == 2); |
4136 | 4136 |
4137 // new.target | 4137 // Evaluate new.target and super constructor. |
4138 VisitForStackValue(args->at(0)); | 4138 VisitForStackValue(args->at(0)); |
4139 | |
4140 // .this_function | |
4141 VisitForStackValue(args->at(1)); | 4139 VisitForStackValue(args->at(1)); |
4142 __ CallRuntime(Runtime::kGetPrototype, 1); | |
4143 __ Push(result_register()); | |
4144 | 4140 |
4145 // Load original constructor into t0. | 4141 // Load original constructor into t0. |
4146 __ lw(t0, MemOperand(sp, 1 * kPointerSize)); | 4142 __ lw(t0, MemOperand(sp, 1 * kPointerSize)); |
4147 | 4143 |
4148 // Check if the calling frame is an arguments adaptor frame. | 4144 // Check if the calling frame is an arguments adaptor frame. |
4149 Label adaptor_frame, args_set_up, runtime; | 4145 Label adaptor_frame, args_set_up, runtime; |
4150 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 4146 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
4151 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); | 4147 __ lw(a3, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
4152 __ Branch(&adaptor_frame, eq, a3, | 4148 __ Branch(&adaptor_frame, eq, a3, |
4153 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 4149 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5338 reinterpret_cast<uint32_t>( | 5334 reinterpret_cast<uint32_t>( |
5339 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5335 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5340 return OSR_AFTER_STACK_CHECK; | 5336 return OSR_AFTER_STACK_CHECK; |
5341 } | 5337 } |
5342 | 5338 |
5343 | 5339 |
5344 } // namespace internal | 5340 } // namespace internal |
5345 } // namespace v8 | 5341 } // namespace v8 |
5346 | 5342 |
5347 #endif // V8_TARGET_ARCH_MIPS | 5343 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |