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

Side by Side Diff: src/ia32/full-codegen-ia32.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/full-codegen.h ('k') | src/mips/full-codegen-mips.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_IA32 7 #if V8_TARGET_ARCH_IA32
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 4619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4630 void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) { 4630 void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) {
4631 DCHECK(expr->arguments()->length() == 0); 4631 DCHECK(expr->arguments()->length() == 0);
4632 ExternalReference debug_is_active = 4632 ExternalReference debug_is_active =
4633 ExternalReference::debug_is_active_address(isolate()); 4633 ExternalReference::debug_is_active_address(isolate());
4634 __ movzx_b(eax, Operand::StaticVariable(debug_is_active)); 4634 __ movzx_b(eax, Operand::StaticVariable(debug_is_active));
4635 __ SmiTag(eax); 4635 __ SmiTag(eax);
4636 context()->Plug(eax); 4636 context()->Plug(eax);
4637 } 4637 }
4638 4638
4639 4639
4640 void FullCodeGenerator::EmitCallSuperWithSpread(CallRuntime* expr) {
4641 // Assert: expr == CallRuntime("ReflectConstruct")
4642 DCHECK_EQ(1, expr->arguments()->length());
4643 CallRuntime* call = expr->arguments()->at(0)->AsCallRuntime();
4644
4645 ZoneList<Expression*>* args = call->arguments();
4646 DCHECK_EQ(3, args->length());
4647
4648 SuperCallReference* super_call_ref = args->at(0)->AsSuperCallReference();
4649 DCHECK_NOT_NULL(super_call_ref);
4650
4651 // Load ReflectConstruct function
4652 EmitLoadJSRuntimeFunction(call);
4653
4654 // Push the target function under the receiver
4655 __ push(Operand(esp, 0));
4656 __ mov(Operand(esp, kPointerSize), eax);
4657
4658 // Push super constructor
4659 EmitLoadSuperConstructor(super_call_ref);
4660 __ Push(result_register());
4661
4662 // Push arguments array
4663 VisitForStackValue(args->at(1));
4664
4665 // Push NewTarget
4666 DCHECK(args->at(2)->IsVariableProxy());
4667 VisitForStackValue(args->at(2));
4668
4669 EmitCallJSRuntimeFunction(call);
4670
4671 // Restore context register.
4672 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
4673 context()->DropAndPlug(1, eax);
4674 }
4675
4676
4677 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { 4640 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
4678 // Push the builtins object as receiver. 4641 // Push the builtins object as receiver.
4679 __ mov(eax, GlobalObjectOperand()); 4642 __ mov(eax, GlobalObjectOperand());
4680 __ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset)); 4643 __ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset));
4681 4644
4682 // Load the function from the receiver. 4645 // Load the function from the receiver.
4683 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); 4646 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
4684 __ mov(LoadDescriptor::NameRegister(), Immediate(expr->name())); 4647 __ mov(LoadDescriptor::NameRegister(), Immediate(expr->name()));
4685 __ mov(LoadDescriptor::SlotRegister(), 4648 __ mov(LoadDescriptor::SlotRegister(),
4686 Immediate(SmiFromSlot(expr->CallRuntimeFeedbackSlot()))); 4649 Immediate(SmiFromSlot(expr->CallRuntimeFeedbackSlot())));
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
5494 Assembler::target_address_at(call_target_address, 5457 Assembler::target_address_at(call_target_address,
5495 unoptimized_code)); 5458 unoptimized_code));
5496 return OSR_AFTER_STACK_CHECK; 5459 return OSR_AFTER_STACK_CHECK;
5497 } 5460 }
5498 5461
5499 5462
5500 } // namespace internal 5463 } // namespace internal
5501 } // namespace v8 5464 } // namespace v8
5502 5465
5503 #endif // V8_TARGET_ARCH_IA32 5466 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698