Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.cc

Issue 1453113002: Handle StepIn for constructors through PrepareStep just like for regular calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add ports Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 3063 matching lines...) Expand 10 before | Expand all | Expand 10 after
3074 3074
3075 // Push the arguments ("left-to-right") on the stack. 3075 // Push the arguments ("left-to-right") on the stack.
3076 ZoneList<Expression*>* args = expr->arguments(); 3076 ZoneList<Expression*>* args = expr->arguments();
3077 int arg_count = args->length(); 3077 int arg_count = args->length();
3078 for (int i = 0; i < arg_count; i++) { 3078 for (int i = 0; i < arg_count; i++) {
3079 VisitForStackValue(args->at(i)); 3079 VisitForStackValue(args->at(i));
3080 } 3080 }
3081 3081
3082 // Call the construct call builtin that handles allocation and 3082 // Call the construct call builtin that handles allocation and
3083 // constructor invocation. 3083 // constructor invocation.
3084 SetConstructCallPosition(expr); 3084 SetConstructCallPosition(expr, arg_count);
3085 3085
3086 // Load function and argument count into a1 and a0. 3086 // Load function and argument count into a1 and a0.
3087 __ li(a0, Operand(arg_count)); 3087 __ li(a0, Operand(arg_count));
3088 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); 3088 __ lw(a1, MemOperand(sp, arg_count * kPointerSize));
3089 3089
3090 // Record call targets in unoptimized code. 3090 // Record call targets in unoptimized code.
3091 __ EmitLoadTypeFeedbackVector(a2); 3091 __ EmitLoadTypeFeedbackVector(a2);
3092 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); 3092 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
3093 3093
3094 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 3094 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
(...skipping 15 matching lines...) Expand all
3110 3110
3111 // Push the arguments ("left-to-right") on the stack. 3111 // Push the arguments ("left-to-right") on the stack.
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, arg_count);
3121 3121
3122 // Load new target 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.
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Call the construct call builtin that handles allocation and
3874 // constructor invocation.
3875 SetConstructCallPosition(expr, 0);
3876
3873 // Load new target into a3. 3877 // Load new target into a3.
3874 __ lw(a3, MemOperand(sp, 1 * kPointerSize)); 3878 __ lw(a3, MemOperand(sp, 1 * kPointerSize));
3875 3879
3876 // Check if the calling frame is an arguments adaptor frame. 3880 // Check if the calling frame is an arguments adaptor frame.
3877 Label adaptor_frame, args_set_up, runtime; 3881 Label adaptor_frame, args_set_up, runtime;
3878 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3882 __ lw(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3879 __ lw(t0, MemOperand(a2, StandardFrameConstants::kContextOffset)); 3883 __ lw(t0, MemOperand(a2, StandardFrameConstants::kContextOffset));
3880 __ Branch(&adaptor_frame, eq, t0, 3884 __ Branch(&adaptor_frame, eq, t0,
3881 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 3885 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
3882 // default constructor has no arguments, so no adaptor frame means no args. 3886 // default constructor has no arguments, so no adaptor frame means no args.
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
5055 reinterpret_cast<uint32_t>( 5059 reinterpret_cast<uint32_t>(
5056 isolate->builtins()->OsrAfterStackCheck()->entry())); 5060 isolate->builtins()->OsrAfterStackCheck()->entry()));
5057 return OSR_AFTER_STACK_CHECK; 5061 return OSR_AFTER_STACK_CHECK;
5058 } 5062 }
5059 5063
5060 5064
5061 } // namespace internal 5065 } // namespace internal
5062 } // namespace v8 5066 } // namespace v8
5063 5067
5064 #endif // V8_TARGET_ARCH_MIPS 5068 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698