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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
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 3105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3116 ZoneList<Expression*>* args = expr->arguments(); | 3116 ZoneList<Expression*>* args = expr->arguments(); |
3117 int arg_count = args->length(); | 3117 int arg_count = args->length(); |
3118 for (int i = 0; i < arg_count; i++) { | 3118 for (int i = 0; i < arg_count; i++) { |
3119 VisitForStackValue(args->at(i)); | 3119 VisitForStackValue(args->at(i)); |
3120 } | 3120 } |
3121 | 3121 |
3122 // Call the construct call builtin that handles allocation and | 3122 // Call the construct call builtin that handles allocation and |
3123 // constructor invocation. | 3123 // constructor invocation. |
3124 SetConstructCallPosition(expr); | 3124 SetConstructCallPosition(expr); |
3125 | 3125 |
3126 // Load original constructor into a4. | 3126 // Load new target into a4. |
3127 VisitForAccumulatorValue(super_call_ref->new_target_var()); | 3127 VisitForAccumulatorValue(super_call_ref->new_target_var()); |
3128 __ mov(a4, result_register()); | 3128 __ mov(a4, result_register()); |
3129 | 3129 |
3130 // Load function and argument count into a1 and a0. | 3130 // Load function and argument count into a1 and a0. |
3131 __ li(a0, Operand(arg_count)); | 3131 __ li(a0, Operand(arg_count)); |
3132 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); | 3132 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); |
3133 | 3133 |
3134 // Record call targets in unoptimized code. | 3134 // Record call targets in unoptimized code. |
3135 __ EmitLoadTypeFeedbackVector(a2); | 3135 __ EmitLoadTypeFeedbackVector(a2); |
3136 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); | 3136 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); |
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3868 | 3868 |
3869 | 3869 |
3870 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { | 3870 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |
3871 ZoneList<Expression*>* args = expr->arguments(); | 3871 ZoneList<Expression*>* args = expr->arguments(); |
3872 DCHECK(args->length() == 2); | 3872 DCHECK(args->length() == 2); |
3873 | 3873 |
3874 // Evaluate new.target and super constructor. | 3874 // Evaluate new.target and super constructor. |
3875 VisitForStackValue(args->at(0)); | 3875 VisitForStackValue(args->at(0)); |
3876 VisitForStackValue(args->at(1)); | 3876 VisitForStackValue(args->at(1)); |
3877 | 3877 |
3878 // Load original constructor into a3. | 3878 // Load new target into a3. |
3879 __ ld(a3, MemOperand(sp, 1 * kPointerSize)); | 3879 __ ld(a3, MemOperand(sp, 1 * kPointerSize)); |
3880 | 3880 |
3881 // Check if the calling frame is an arguments adaptor frame. | 3881 // Check if the calling frame is an arguments adaptor frame. |
3882 Label adaptor_frame, args_set_up, runtime; | 3882 Label adaptor_frame, args_set_up, runtime; |
3883 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 3883 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
3884 __ ld(a4, MemOperand(a2, StandardFrameConstants::kContextOffset)); | 3884 __ ld(a4, MemOperand(a2, StandardFrameConstants::kContextOffset)); |
3885 __ Branch(&adaptor_frame, eq, a4, | 3885 __ Branch(&adaptor_frame, eq, a4, |
3886 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); | 3886 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
3887 // default constructor has no arguments, so no adaptor frame means no args. | 3887 // default constructor has no arguments, so no adaptor frame means no args. |
3888 __ mov(a0, zero_reg); | 3888 __ mov(a0, zero_reg); |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5063 reinterpret_cast<uint64_t>( | 5063 reinterpret_cast<uint64_t>( |
5064 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5064 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5065 return OSR_AFTER_STACK_CHECK; | 5065 return OSR_AFTER_STACK_CHECK; |
5066 } | 5066 } |
5067 | 5067 |
5068 | 5068 |
5069 } // namespace internal | 5069 } // namespace internal |
5070 } // namespace v8 | 5070 } // namespace v8 |
5071 | 5071 |
5072 #endif // V8_TARGET_ARCH_MIPS64 | 5072 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |