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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/debug/debug.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 3071 matching lines...) Expand 10 before | Expand all | Expand 10 after
3082 3082
3083 // Push the arguments ("left-to-right") on the stack. 3083 // Push the arguments ("left-to-right") on the stack.
3084 ZoneList<Expression*>* args = expr->arguments(); 3084 ZoneList<Expression*>* args = expr->arguments();
3085 int arg_count = args->length(); 3085 int arg_count = args->length();
3086 for (int i = 0; i < arg_count; i++) { 3086 for (int i = 0; i < arg_count; i++) {
3087 VisitForStackValue(args->at(i)); 3087 VisitForStackValue(args->at(i));
3088 } 3088 }
3089 3089
3090 // Call the construct call builtin that handles allocation and 3090 // Call the construct call builtin that handles allocation and
3091 // constructor invocation. 3091 // constructor invocation.
3092 SetConstructCallPosition(expr); 3092 SetConstructCallPosition(expr, arg_count);
3093 3093
3094 // Load function and argument count into r1 and r0. 3094 // Load function and argument count into r1 and r0.
3095 __ mov(r0, Operand(arg_count)); 3095 __ mov(r0, Operand(arg_count));
3096 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); 3096 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize));
3097 3097
3098 // Record call targets in unoptimized code. 3098 // Record call targets in unoptimized code.
3099 __ EmitLoadTypeFeedbackVector(r2); 3099 __ EmitLoadTypeFeedbackVector(r2);
3100 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); 3100 __ mov(r3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
3101 3101
3102 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 3102 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
(...skipping 15 matching lines...) Expand all
3118 3118
3119 // Push the arguments ("left-to-right") on the stack. 3119 // Push the arguments ("left-to-right") on the stack.
3120 ZoneList<Expression*>* args = expr->arguments(); 3120 ZoneList<Expression*>* args = expr->arguments();
3121 int arg_count = args->length(); 3121 int arg_count = args->length();
3122 for (int i = 0; i < arg_count; i++) { 3122 for (int i = 0; i < arg_count; i++) {
3123 VisitForStackValue(args->at(i)); 3123 VisitForStackValue(args->at(i));
3124 } 3124 }
3125 3125
3126 // Call the construct call builtin that handles allocation and 3126 // Call the construct call builtin that handles allocation and
3127 // constructor invocation. 3127 // constructor invocation.
3128 SetConstructCallPosition(expr); 3128 SetConstructCallPosition(expr, arg_count);
3129 3129
3130 // Load new target into r4. 3130 // Load new target into r4.
3131 VisitForAccumulatorValue(super_call_ref->new_target_var()); 3131 VisitForAccumulatorValue(super_call_ref->new_target_var());
3132 __ mov(r4, result_register()); 3132 __ mov(r4, result_register());
3133 3133
3134 // Load function and argument count into r1 and r0. 3134 // Load function and argument count into r1 and r0.
3135 __ mov(r0, Operand(arg_count)); 3135 __ mov(r0, Operand(arg_count));
3136 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); 3136 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize));
3137 3137
3138 // Record call targets in unoptimized code. 3138 // Record call targets in unoptimized code.
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
3846 3846
3847 3847
3848 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { 3848 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
3849 ZoneList<Expression*>* args = expr->arguments(); 3849 ZoneList<Expression*>* args = expr->arguments();
3850 DCHECK(args->length() == 2); 3850 DCHECK(args->length() == 2);
3851 3851
3852 // Evaluate new.target and super constructor. 3852 // Evaluate new.target and super constructor.
3853 VisitForStackValue(args->at(0)); 3853 VisitForStackValue(args->at(0));
3854 VisitForStackValue(args->at(1)); 3854 VisitForStackValue(args->at(1));
3855 3855
3856 // Call the construct call builtin that handles allocation and
3857 // constructor invocation.
3858 SetConstructCallPosition(expr, 0);
3859
3856 // Load new target into r3. 3860 // Load new target into r3.
3857 __ ldr(r3, MemOperand(sp, 1 * kPointerSize)); 3861 __ ldr(r3, MemOperand(sp, 1 * kPointerSize));
3858 3862
3859 // Check if the calling frame is an arguments adaptor frame. 3863 // Check if the calling frame is an arguments adaptor frame.
3860 Label adaptor_frame, args_set_up, runtime; 3864 Label adaptor_frame, args_set_up, runtime;
3861 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3865 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3862 __ ldr(r4, MemOperand(r2, StandardFrameConstants::kContextOffset)); 3866 __ ldr(r4, MemOperand(r2, StandardFrameConstants::kContextOffset));
3863 __ cmp(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 3867 __ cmp(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
3864 __ b(eq, &adaptor_frame); 3868 __ b(eq, &adaptor_frame);
3865 // default constructor has no arguments, so no adaptor frame means no args. 3869 // default constructor has no arguments, so no adaptor frame means no args.
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
5090 DCHECK(interrupt_address == 5094 DCHECK(interrupt_address ==
5091 isolate->builtins()->OsrAfterStackCheck()->entry()); 5095 isolate->builtins()->OsrAfterStackCheck()->entry());
5092 return OSR_AFTER_STACK_CHECK; 5096 return OSR_AFTER_STACK_CHECK;
5093 } 5097 }
5094 5098
5095 5099
5096 } // namespace internal 5100 } // namespace internal
5097 } // namespace v8 5101 } // namespace v8
5098 5102
5099 #endif // V8_TARGET_ARCH_ARM 5103 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698