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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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 3067 matching lines...) Expand 10 before | Expand all | Expand 10 after
3078 3078
3079 // Push the arguments ("left-to-right") on the stack. 3079 // Push the arguments ("left-to-right") on the stack.
3080 ZoneList<Expression*>* args = expr->arguments(); 3080 ZoneList<Expression*>* args = expr->arguments();
3081 int arg_count = args->length(); 3081 int arg_count = args->length();
3082 for (int i = 0; i < arg_count; i++) { 3082 for (int i = 0; i < arg_count; i++) {
3083 VisitForStackValue(args->at(i)); 3083 VisitForStackValue(args->at(i));
3084 } 3084 }
3085 3085
3086 // Call the construct call builtin that handles allocation and 3086 // Call the construct call builtin that handles allocation and
3087 // constructor invocation. 3087 // constructor invocation.
3088 SetConstructCallPosition(expr); 3088 SetConstructCallPosition(expr, arg_count);
3089 3089
3090 // Load function and argument count into a1 and a0. 3090 // Load function and argument count into a1 and a0.
3091 __ li(a0, Operand(arg_count)); 3091 __ li(a0, Operand(arg_count));
3092 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); 3092 __ ld(a1, MemOperand(sp, arg_count * kPointerSize));
3093 3093
3094 // Record call targets in unoptimized code. 3094 // Record call targets in unoptimized code.
3095 __ EmitLoadTypeFeedbackVector(a2); 3095 __ EmitLoadTypeFeedbackVector(a2);
3096 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); 3096 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
3097 3097
3098 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 3098 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
(...skipping 15 matching lines...) Expand all
3114 3114
3115 // Push the arguments ("left-to-right") on the stack. 3115 // Push the arguments ("left-to-right") on the stack.
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, arg_count);
3125 3125
3126 // Load new target 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.
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Call the construct call builtin that handles allocation and
3879 // constructor invocation.
3880 SetConstructCallPosition(expr, 0);
3881
3878 // Load new target into a3. 3882 // Load new target into a3.
3879 __ ld(a3, MemOperand(sp, 1 * kPointerSize)); 3883 __ ld(a3, MemOperand(sp, 1 * kPointerSize));
3880 3884
3881 // Check if the calling frame is an arguments adaptor frame. 3885 // Check if the calling frame is an arguments adaptor frame.
3882 Label adaptor_frame, args_set_up, runtime; 3886 Label adaptor_frame, args_set_up, runtime;
3883 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3887 __ ld(a2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3884 __ ld(a4, MemOperand(a2, StandardFrameConstants::kContextOffset)); 3888 __ ld(a4, MemOperand(a2, StandardFrameConstants::kContextOffset));
3885 __ Branch(&adaptor_frame, eq, a4, 3889 __ Branch(&adaptor_frame, eq, a4,
3886 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 3890 Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
3887 // default constructor has no arguments, so no adaptor frame means no args. 3891 // default constructor has no arguments, so no adaptor frame means no args.
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
5063 reinterpret_cast<uint64_t>( 5067 reinterpret_cast<uint64_t>(
5064 isolate->builtins()->OsrAfterStackCheck()->entry())); 5068 isolate->builtins()->OsrAfterStackCheck()->entry()));
5065 return OSR_AFTER_STACK_CHECK; 5069 return OSR_AFTER_STACK_CHECK;
5066 } 5070 }
5067 5071
5068 5072
5069 } // namespace internal 5073 } // namespace internal
5070 } // namespace v8 5074 } // namespace v8
5071 5075
5072 #endif // V8_TARGET_ARCH_MIPS64 5076 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698