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

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

Issue 1442643009: Rename original constructor to new target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase 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/ia32/full-codegen-ia32.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 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 2814 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
2834 2834
2835 // Load original constructor 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.
2844 __ EmitLoadTypeFeedbackVector(x2); 2844 __ EmitLoadTypeFeedbackVector(x2);
2845 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot())); 2845 __ Mov(x3, SmiFromSlot(expr->CallFeedbackSlot()));
(...skipping 710 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 // Load original constructor into x3. 3566 // Load new target into x3.
3567 __ Peek(x3, 1 * kPointerSize); 3567 __ Peek(x3, 1 * kPointerSize);
3568 3568
3569 // Check if the calling frame is an arguments adaptor frame. 3569 // Check if the calling frame is an arguments adaptor frame.
3570 Label adaptor_frame, args_set_up, runtime; 3570 Label adaptor_frame, args_set_up, runtime;
3571 __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3571 __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3572 __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset)); 3572 __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset));
3573 __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); 3573 __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
3574 __ B(eq, &adaptor_frame); 3574 __ B(eq, &adaptor_frame);
3575 // default constructor has no arguments, so no adaptor frame means no args. 3575 // default constructor has no arguments, so no adaptor frame means no args.
3576 __ Mov(x0, Operand(0)); 3576 __ Mov(x0, Operand(0));
(...skipping 1500 matching lines...) Expand 10 before | Expand all | Expand 10 after
5077 } 5077 }
5078 5078
5079 return INTERRUPT; 5079 return INTERRUPT;
5080 } 5080 }
5081 5081
5082 5082
5083 } // namespace internal 5083 } // namespace internal
5084 } // namespace v8 5084 } // namespace v8
5085 5085
5086 #endif // V8_TARGET_ARCH_ARM64 5086 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698