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

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

Issue 1234383002: Remove obsolete %CallSuperWithSpread intrinsic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-super-4
Patch Set: Ported to all architectures. Created 5 years, 5 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/runtime/runtime-classes.cc ('k') | src/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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 4637 matching lines...) Expand 10 before | Expand all | Expand 10 after
4648 DCHECK(expr->arguments()->length() == 0); 4648 DCHECK(expr->arguments()->length() == 0);
4649 ExternalReference debug_is_active = 4649 ExternalReference debug_is_active =
4650 ExternalReference::debug_is_active_address(isolate()); 4650 ExternalReference::debug_is_active_address(isolate());
4651 __ Move(kScratchRegister, debug_is_active); 4651 __ Move(kScratchRegister, debug_is_active);
4652 __ movzxbp(rax, Operand(kScratchRegister, 0)); 4652 __ movzxbp(rax, Operand(kScratchRegister, 0));
4653 __ Integer32ToSmi(rax, rax); 4653 __ Integer32ToSmi(rax, rax);
4654 context()->Plug(rax); 4654 context()->Plug(rax);
4655 } 4655 }
4656 4656
4657 4657
4658 void FullCodeGenerator::EmitCallSuperWithSpread(CallRuntime* expr) {
4659 // Assert: expr === CallRuntime("ReflectConstruct")
4660 DCHECK_EQ(1, expr->arguments()->length());
4661 CallRuntime* call = expr->arguments()->at(0)->AsCallRuntime();
4662
4663 ZoneList<Expression*>* args = call->arguments();
4664 DCHECK_EQ(3, args->length());
4665
4666 SuperCallReference* super_call_ref = args->at(0)->AsSuperCallReference();
4667 DCHECK_NOT_NULL(super_call_ref);
4668
4669 // Load ReflectConstruct function
4670 EmitLoadJSRuntimeFunction(call);
4671
4672 // Push the target function under the receiver.
4673 __ Push(Operand(rsp, 0));
4674 __ movp(Operand(rsp, kPointerSize), rax);
4675
4676 // Push super constructor
4677 EmitLoadSuperConstructor(super_call_ref);
4678 __ Push(result_register());
4679
4680 // Push arguments array
4681 VisitForStackValue(args->at(1));
4682
4683 // Push NewTarget
4684 DCHECK(args->at(2)->IsVariableProxy());
4685 VisitForStackValue(args->at(2));
4686
4687 EmitCallJSRuntimeFunction(call);
4688
4689 // Restore context register.
4690 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
4691 context()->DropAndPlug(1, rax);
4692 }
4693
4694
4695 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { 4658 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
4696 // Push the builtins object as receiver. 4659 // Push the builtins object as receiver.
4697 __ movp(rax, GlobalObjectOperand()); 4660 __ movp(rax, GlobalObjectOperand());
4698 __ Push(FieldOperand(rax, GlobalObject::kBuiltinsOffset)); 4661 __ Push(FieldOperand(rax, GlobalObject::kBuiltinsOffset));
4699 4662
4700 // Load the function from the receiver. 4663 // Load the function from the receiver.
4701 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0)); 4664 __ movp(LoadDescriptor::ReceiverRegister(), Operand(rsp, 0));
4702 __ Move(LoadDescriptor::NameRegister(), expr->name()); 4665 __ Move(LoadDescriptor::NameRegister(), expr->name());
4703 __ Move(LoadDescriptor::SlotRegister(), 4666 __ Move(LoadDescriptor::SlotRegister(),
4704 SmiFromSlot(expr->CallRuntimeFeedbackSlot())); 4667 SmiFromSlot(expr->CallRuntimeFeedbackSlot()));
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
5511 Assembler::target_address_at(call_target_address, 5474 Assembler::target_address_at(call_target_address,
5512 unoptimized_code)); 5475 unoptimized_code));
5513 return OSR_AFTER_STACK_CHECK; 5476 return OSR_AFTER_STACK_CHECK;
5514 } 5477 }
5515 5478
5516 5479
5517 } // namespace internal 5480 } // namespace internal
5518 } // namespace v8 5481 } // namespace v8
5519 5482
5520 #endif // V8_TARGET_ARCH_X64 5483 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime/runtime-classes.cc ('k') | src/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698