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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/deoptimizer.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 3109 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
3129 3129
3130 // Load original constructor 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.
3139 __ EmitLoadTypeFeedbackVector(r2); 3139 __ EmitLoadTypeFeedbackVector(r2);
3140 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); 3140 __ mov(r3, Operand(SmiFromSlot(expr->CallFeedbackSlot())));
(...skipping 705 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 // Load original constructor into r3. 3856 // Load new target into r3.
3857 __ ldr(r3, MemOperand(sp, 1 * kPointerSize)); 3857 __ ldr(r3, MemOperand(sp, 1 * kPointerSize));
3858 3858
3859 // Check if the calling frame is an arguments adaptor frame. 3859 // Check if the calling frame is an arguments adaptor frame.
3860 Label adaptor_frame, args_set_up, runtime; 3860 Label adaptor_frame, args_set_up, runtime;
3861 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); 3861 __ ldr(r2, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
3862 __ ldr(r4, MemOperand(r2, StandardFrameConstants::kContextOffset)); 3862 __ ldr(r4, MemOperand(r2, StandardFrameConstants::kContextOffset));
3863 __ cmp(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); 3863 __ cmp(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
3864 __ b(eq, &adaptor_frame); 3864 __ b(eq, &adaptor_frame);
3865 // default constructor has no arguments, so no adaptor frame means no args. 3865 // default constructor has no arguments, so no adaptor frame means no args.
3866 __ mov(r0, Operand::Zero()); 3866 __ mov(r0, Operand::Zero());
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
5090 DCHECK(interrupt_address == 5090 DCHECK(interrupt_address ==
5091 isolate->builtins()->OsrAfterStackCheck()->entry()); 5091 isolate->builtins()->OsrAfterStackCheck()->entry());
5092 return OSR_AFTER_STACK_CHECK; 5092 return OSR_AFTER_STACK_CHECK;
5093 } 5093 }
5094 5094
5095 5095
5096 } // namespace internal 5096 } // namespace internal
5097 } // namespace v8 5097 } // namespace v8
5098 5098
5099 #endif // V8_TARGET_ARCH_ARM 5099 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/deoptimizer.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