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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
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 4688 matching lines...) Expand 10 before | Expand all | Expand 10 after
4699 DCHECK(expr->arguments()->length() == 0); 4699 DCHECK(expr->arguments()->length() == 0);
4700 ExternalReference debug_is_active = 4700 ExternalReference debug_is_active =
4701 ExternalReference::debug_is_active_address(isolate()); 4701 ExternalReference::debug_is_active_address(isolate());
4702 __ mov(ip, Operand(debug_is_active)); 4702 __ mov(ip, Operand(debug_is_active));
4703 __ ldrb(r0, MemOperand(ip)); 4703 __ ldrb(r0, MemOperand(ip));
4704 __ SmiTag(r0); 4704 __ SmiTag(r0);
4705 context()->Plug(r0); 4705 context()->Plug(r0);
4706 } 4706 }
4707 4707
4708 4708
4709 void FullCodeGenerator::EmitCallSuperWithSpread(CallRuntime* expr) {
4710 // Assert: expr === CallRuntime("ReflectConstruct")
4711 DCHECK_EQ(1, expr->arguments()->length());
4712 CallRuntime* call = expr->arguments()->at(0)->AsCallRuntime();
4713
4714 ZoneList<Expression*>* args = call->arguments();
4715 DCHECK_EQ(3, args->length());
4716
4717 SuperCallReference* super_call_ref = args->at(0)->AsSuperCallReference();
4718 DCHECK_NOT_NULL(super_call_ref);
4719
4720 // Load ReflectConstruct function
4721 EmitLoadJSRuntimeFunction(call);
4722
4723 // Push the target function under the receiver.
4724 __ ldr(ip, MemOperand(sp, 0));
4725 __ push(ip);
4726 __ str(r0, MemOperand(sp, kPointerSize));
4727
4728 // Push super constructor
4729 EmitLoadSuperConstructor(super_call_ref);
4730 __ Push(result_register());
4731
4732 // Push arguments array
4733 VisitForStackValue(args->at(1));
4734
4735 // Push NewTarget
4736 DCHECK(args->at(2)->IsVariableProxy());
4737 VisitForStackValue(args->at(2));
4738
4739 EmitCallJSRuntimeFunction(call);
4740
4741 // Restore context register.
4742 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
4743 context()->DropAndPlug(1, r0);
4744 }
4745
4746
4747 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { 4709 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
4748 // Push the builtins object as the receiver. 4710 // Push the builtins object as the receiver.
4749 Register receiver = LoadDescriptor::ReceiverRegister(); 4711 Register receiver = LoadDescriptor::ReceiverRegister();
4750 __ ldr(receiver, GlobalObjectOperand()); 4712 __ ldr(receiver, GlobalObjectOperand());
4751 __ ldr(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); 4713 __ ldr(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset));
4752 __ push(receiver); 4714 __ push(receiver);
4753 4715
4754 // Load the function from the receiver. 4716 // Load the function from the receiver.
4755 __ mov(LoadDescriptor::NameRegister(), Operand(expr->name())); 4717 __ mov(LoadDescriptor::NameRegister(), Operand(expr->name()));
4756 __ mov(LoadDescriptor::SlotRegister(), 4718 __ mov(LoadDescriptor::SlotRegister(),
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
5626 DCHECK(interrupt_address == 5588 DCHECK(interrupt_address ==
5627 isolate->builtins()->OsrAfterStackCheck()->entry()); 5589 isolate->builtins()->OsrAfterStackCheck()->entry());
5628 return OSR_AFTER_STACK_CHECK; 5590 return OSR_AFTER_STACK_CHECK;
5629 } 5591 }
5630 5592
5631 5593
5632 } // namespace internal 5594 } // namespace internal
5633 } // namespace v8 5595 } // namespace v8
5634 5596
5635 #endif // V8_TARGET_ARCH_ARM 5597 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698