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

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.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/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 2776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2787 2787
2788 // Push the arguments ("left-to-right") on the stack. 2788 // Push the arguments ("left-to-right") on the stack.
2789 ZoneList<Expression*>* args = expr->arguments(); 2789 ZoneList<Expression*>* args = expr->arguments();
2790 int arg_count = args->length(); 2790 int arg_count = args->length();
2791 for (int i = 0; i < arg_count; i++) { 2791 for (int i = 0; i < arg_count; i++) {
2792 VisitForStackValue(args->at(i)); 2792 VisitForStackValue(args->at(i));
2793 } 2793 }
2794 2794
2795 // Call the construct call builtin that handles allocation and 2795 // Call the construct call builtin that handles allocation and
2796 // constructor invocation. 2796 // constructor invocation.
2797 SetConstructCallPosition(expr); 2797 SetConstructCallPosition(expr, arg_count);
2798 2798
2799 // Load function and argument count into x1 and x0. 2799 // Load function and argument count into x1 and x0.
2800 __ Mov(x0, arg_count); 2800 __ Mov(x0, arg_count);
2801 __ Peek(x1, arg_count * kXRegSize); 2801 __ Peek(x1, arg_count * kXRegSize);
2802 2802
2803 // Record call targets in unoptimized code. 2803 // Record call targets in unoptimized code.
2804 __ EmitLoadTypeFeedbackVector(x2); 2804 __ EmitLoadTypeFeedbackVector(x2);
2805 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot())); 2805 __ Mov(x3, SmiFromSlot(expr->CallNewFeedbackSlot()));
2806 2806
2807 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 2807 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
(...skipping 15 matching lines...) Expand all
2823 2823
2824 // Push the arguments ("left-to-right") on the stack. 2824 // Push the arguments ("left-to-right") on the stack.
2825 ZoneList<Expression*>* args = expr->arguments(); 2825 ZoneList<Expression*>* args = expr->arguments();
2826 int arg_count = args->length(); 2826 int arg_count = args->length();
2827 for (int i = 0; i < arg_count; i++) { 2827 for (int i = 0; i < arg_count; i++) {
2828 VisitForStackValue(args->at(i)); 2828 VisitForStackValue(args->at(i));
2829 } 2829 }
2830 2830
2831 // Call the construct call builtin that handles allocation and 2831 // Call the construct call builtin that handles allocation and
2832 // constructor invocation. 2832 // constructor invocation.
2833 SetConstructCallPosition(expr); 2833 SetConstructCallPosition(expr, arg_count);
2834 2834
2835 // Load new target into x4. 2835 // Load new target into x4.
2836 VisitForAccumulatorValue(super_call_ref->new_target_var()); 2836 VisitForAccumulatorValue(super_call_ref->new_target_var());
2837 __ Mov(x4, result_register()); 2837 __ Mov(x4, result_register());
2838 2838
2839 // Load function and argument count into x1 and x0. 2839 // Load function and argument count into x1 and x0.
2840 __ Mov(x0, arg_count); 2840 __ Mov(x0, arg_count);
2841 __ Peek(x1, arg_count * kXRegSize); 2841 __ Peek(x1, arg_count * kXRegSize);
2842 2842
2843 // Record call targets in unoptimized code. 2843 // Record call targets in unoptimized code.
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
3556 3556
3557 3557
3558 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { 3558 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
3559 ZoneList<Expression*>* args = expr->arguments(); 3559 ZoneList<Expression*>* args = expr->arguments();
3560 DCHECK(args->length() == 2); 3560 DCHECK(args->length() == 2);
3561 3561
3562 // Evaluate new.target and super constructor. 3562 // Evaluate new.target and super constructor.
3563 VisitForStackValue(args->at(0)); 3563 VisitForStackValue(args->at(0));
3564 VisitForStackValue(args->at(1)); 3564 VisitForStackValue(args->at(1));
3565 3565
3566 // Call the construct call builtin that handles allocation and
3567 // constructor invocation.
3568 SetConstructCallPosition(expr, 0);
3569
3566 // Load new target into x3. 3570 // Load new target into x3.
3567 __ Peek(x3, 1 * kPointerSize); 3571 __ Peek(x3, 1 * kPointerSize);
3568 3572
3569 // Check if the calling frame is an arguments adaptor frame. 3573 // Check if the calling frame is an arguments adaptor frame.
3570 Label adaptor_frame, args_set_up, runtime; 3574 Label adaptor_frame, args_set_up, runtime;
3571 __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3575 __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3572 __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset)); 3576 __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset));
3573 __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); 3577 __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
3574 __ B(eq, &adaptor_frame); 3578 __ B(eq, &adaptor_frame);
3575 // default constructor has no arguments, so no adaptor frame means no args. 3579 // default constructor has no arguments, so no adaptor frame means no args.
(...skipping 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
5077 } 5081 }
5078 5082
5079 return INTERRUPT; 5083 return INTERRUPT;
5080 } 5084 }
5081 5085
5082 5086
5083 } // namespace internal 5087 } // namespace internal
5084 } // namespace v8 5088 } // namespace v8
5085 5089
5086 #endif // V8_TARGET_ARCH_ARM64 5090 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698