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

Side by Side Diff: src/x87/full-codegen-x87.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/x64/full-codegen-x64.cc ('k') | no next file » | 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_X87 7 #if V8_TARGET_ARCH_X87
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 4609 matching lines...) Expand 10 before | Expand all | Expand 10 after
4620 void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) { 4620 void FullCodeGenerator::EmitDebugIsActive(CallRuntime* expr) {
4621 DCHECK(expr->arguments()->length() == 0); 4621 DCHECK(expr->arguments()->length() == 0);
4622 ExternalReference debug_is_active = 4622 ExternalReference debug_is_active =
4623 ExternalReference::debug_is_active_address(isolate()); 4623 ExternalReference::debug_is_active_address(isolate());
4624 __ movzx_b(eax, Operand::StaticVariable(debug_is_active)); 4624 __ movzx_b(eax, Operand::StaticVariable(debug_is_active));
4625 __ SmiTag(eax); 4625 __ SmiTag(eax);
4626 context()->Plug(eax); 4626 context()->Plug(eax);
4627 } 4627 }
4628 4628
4629 4629
4630 void FullCodeGenerator::EmitCallSuperWithSpread(CallRuntime* expr) {
4631 // Assert: expr == CallRuntime("ReflectConstruct")
4632 DCHECK_EQ(1, expr->arguments()->length());
4633 CallRuntime* call = expr->arguments()->at(0)->AsCallRuntime();
4634
4635 ZoneList<Expression*>* args = call->arguments();
4636 DCHECK_EQ(3, args->length());
4637
4638 SuperCallReference* super_call_ref = args->at(0)->AsSuperCallReference();
4639 DCHECK_NOT_NULL(super_call_ref);
4640
4641 // Load ReflectConstruct function
4642 EmitLoadJSRuntimeFunction(call);
4643
4644 // Push the target function under the receiver
4645 __ push(Operand(esp, 0));
4646 __ mov(Operand(esp, kPointerSize), eax);
4647
4648 // Push super constructor
4649 EmitLoadSuperConstructor(super_call_ref);
4650 __ Push(result_register());
4651
4652 // Push arguments array
4653 VisitForStackValue(args->at(1));
4654
4655 // Push NewTarget
4656 DCHECK(args->at(2)->IsVariableProxy());
4657 VisitForStackValue(args->at(2));
4658
4659 EmitCallJSRuntimeFunction(call);
4660
4661 // Restore context register.
4662 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
4663 context()->DropAndPlug(1, eax);
4664 }
4665
4666
4667 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { 4630 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
4668 // Push the builtins object as receiver. 4631 // Push the builtins object as receiver.
4669 __ mov(eax, GlobalObjectOperand()); 4632 __ mov(eax, GlobalObjectOperand());
4670 __ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset)); 4633 __ push(FieldOperand(eax, GlobalObject::kBuiltinsOffset));
4671 4634
4672 // Load the function from the receiver. 4635 // Load the function from the receiver.
4673 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0)); 4636 __ mov(LoadDescriptor::ReceiverRegister(), Operand(esp, 0));
4674 __ mov(LoadDescriptor::NameRegister(), Immediate(expr->name())); 4637 __ mov(LoadDescriptor::NameRegister(), Immediate(expr->name()));
4675 __ mov(LoadDescriptor::SlotRegister(), 4638 __ mov(LoadDescriptor::SlotRegister(),
4676 Immediate(SmiFromSlot(expr->CallRuntimeFeedbackSlot()))); 4639 Immediate(SmiFromSlot(expr->CallRuntimeFeedbackSlot())));
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
5484 Assembler::target_address_at(call_target_address, 5447 Assembler::target_address_at(call_target_address,
5485 unoptimized_code)); 5448 unoptimized_code));
5486 return OSR_AFTER_STACK_CHECK; 5449 return OSR_AFTER_STACK_CHECK;
5487 } 5450 }
5488 5451
5489 5452
5490 } // namespace internal 5453 } // namespace internal
5491 } // namespace v8 5454 } // namespace v8
5492 5455
5493 #endif // V8_TARGET_ARCH_X87 5456 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698