| 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 3101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3112 ZoneList<Expression*>* args = expr->arguments(); | 3112 ZoneList<Expression*>* args = expr->arguments(); |
| 3113 int arg_count = args->length(); | 3113 int arg_count = args->length(); |
| 3114 for (int i = 0; i < arg_count; i++) { | 3114 for (int i = 0; i < arg_count; i++) { |
| 3115 VisitForStackValue(args->at(i)); | 3115 VisitForStackValue(args->at(i)); |
| 3116 } | 3116 } |
| 3117 | 3117 |
| 3118 // Call the construct call builtin that handles allocation and | 3118 // Call the construct call builtin that handles allocation and |
| 3119 // constructor invocation. | 3119 // constructor invocation. |
| 3120 SetConstructCallPosition(expr); | 3120 SetConstructCallPosition(expr); |
| 3121 | 3121 |
| 3122 // Load original constructor into t0. | 3122 // Load new target into t0. |
| 3123 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3123 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
| 3124 __ mov(t0, result_register()); | 3124 __ mov(t0, result_register()); |
| 3125 | 3125 |
| 3126 // Load function and argument count into a1 and a0. | 3126 // Load function and argument count into a1 and a0. |
| 3127 __ li(a0, Operand(arg_count)); | 3127 __ li(a0, Operand(arg_count)); |
| 3128 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); | 3128 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); |
| 3129 | 3129 |
| 3130 // Record call targets in unoptimized code. | 3130 // Record call targets in unoptimized code. |
| 3131 __ EmitLoadTypeFeedbackVector(a2); | 3131 __ EmitLoadTypeFeedbackVector(a2); |
| 3132 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 3132 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3863 | 3863 |
| 3864 | 3864 |
| 3865 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { | 3865 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
| 3866 ZoneList<Expression*>* args = expr->arguments(); | 3866 ZoneList<Expression*>* args = expr->arguments(); |
| 3867 DCHECK(args->length() == 2); | 3867 DCHECK(args->length() == 2); |
| 3868 | 3868 |
| 3869 // Evaluate new.target and super constructor. | 3869 // Evaluate new.target and super constructor. |
| 3870 VisitForStackValue(args->at(0)); | 3870 VisitForStackValue(args->at(0)); |
| 3871 VisitForStackValue(args->at(1)); | 3871 VisitForStackValue(args->at(1)); |
| 3872 | 3872 |
| 3873 // Load original constructor into a3. | 3873 // Load new target into a3. |
| 3874 __ lw(a3, MemOperand(sp, 1 * kPointerSize)); | 3874 __ lw(a3, MemOperand(sp, 1 * kPointerSize)); |
| 3875 | 3875 |
| 3876 // Check if the calling frame is an arguments adaptor frame. | 3876 // Check if the calling frame is an arguments adaptor frame. |
| 3877 Label adaptor_frame, args_set_up, runtime; | 3877 Label adaptor_frame, args_set_up, runtime; |
| 3878 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 3878 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
| 3879 __ lw(t0, MemOperand(a2, StandardFrameConstants::kContextOffset)); | 3879 __ lw(t0, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
| 3880 __ Branch(&adaptor_frame, eq, t0, | 3880 __ Branch(&adaptor_frame, eq, t0, |
| 3881 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 3881 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| 3882 // default constructor has no arguments, so no adaptor frame means no args. | 3882 // default constructor has no arguments, so no adaptor frame means no args. |
| 3883 __ mov(a0, zero_reg); | 3883 __ mov(a0, zero_reg); |
| (...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5055 reinterpret_cast<uint32_t>( | 5055 reinterpret_cast<uint32_t>( |
| 5056 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5056 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 5057 return OSR_AFTER_STACK_CHECK; | 5057 return OSR_AFTER_STACK_CHECK; |
| 5058 } | 5058 } |
| 5059 | 5059 |
| 5060 | 5060 |
| 5061 } // namespace internal | 5061 } // namespace internal |
| 5062 } // namespace v8 | 5062 } // namespace v8 |
| 5063 | 5063 |
| 5064 #endif // V8_TARGET_ARCH_MIPS | 5064 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |