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

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

Issue 1321343004: Desugar %DefaultConstructorCallSuper partially in parser. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months 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/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.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_X64 5 #if V8_TARGET_ARCH_X64
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/compiler.h" 10 #include "src/compiler.h"
(...skipping 3990 matching lines...) Expand 10 before | Expand all | Expand 10 after
4001 __ bind(&done); 4001 __ bind(&done);
4002 4002
4003 context()->Plug(rax); 4003 context()->Plug(rax);
4004 } 4004 }
4005 4005
4006 4006
4007 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { 4007 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) {
4008 ZoneList<Expression*>* args = expr->arguments(); 4008 ZoneList<Expression*>* args = expr->arguments();
4009 DCHECK(args->length() == 2); 4009 DCHECK(args->length() == 2);
4010 4010
4011 // new.target 4011 // Evaluate new.target and super constructor.
4012 VisitForStackValue(args->at(0)); 4012 VisitForStackValue(args->at(0));
4013
4014 // .this_function
4015 VisitForStackValue(args->at(1)); 4013 VisitForStackValue(args->at(1));
4016 __ CallRuntime(Runtime::kGetPrototype, 1);
4017 __ Push(result_register());
4018 4014
4019 // Load original constructor into rcx. 4015 // Load original constructor into rcx.
4020 __ movp(rcx, Operand(rsp, 1 * kPointerSize)); 4016 __ movp(rcx, Operand(rsp, 1 * kPointerSize));
4021 4017
4022 // Check if the calling frame is an arguments adaptor frame. 4018 // Check if the calling frame is an arguments adaptor frame.
4023 Label adaptor_frame, args_set_up, runtime; 4019 Label adaptor_frame, args_set_up, runtime;
4024 __ movp(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); 4020 __ movp(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
4025 __ movp(rbx, Operand(rdx, StandardFrameConstants::kContextOffset)); 4021 __ movp(rbx, Operand(rdx, StandardFrameConstants::kContextOffset));
4026 __ Cmp(rbx, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); 4022 __ Cmp(rbx, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
4027 __ j(equal, &adaptor_frame); 4023 __ j(equal, &adaptor_frame);
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
5255 Assembler::target_address_at(call_target_address, 5251 Assembler::target_address_at(call_target_address,
5256 unoptimized_code)); 5252 unoptimized_code));
5257 return OSR_AFTER_STACK_CHECK; 5253 return OSR_AFTER_STACK_CHECK;
5258 } 5254 }
5259 5255
5260 5256
5261 } // namespace internal 5257 } // namespace internal
5262 } // namespace v8 5258 } // namespace v8
5263 5259
5264 #endif // V8_TARGET_ARCH_X64 5260 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698