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

Side by Side Diff: src/ppc/full-codegen-ppc.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/parser.cc ('k') | src/runtime/runtime.h » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 7 #if V8_TARGET_ARCH_PPC
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 4727 matching lines...) Expand 10 before | Expand all | Expand 10 after
4738 DCHECK(expr->arguments()->length() == 0); 4738 DCHECK(expr->arguments()->length() == 0);
4739 ExternalReference debug_is_active = 4739 ExternalReference debug_is_active =
4740 ExternalReference::debug_is_active_address(isolate()); 4740 ExternalReference::debug_is_active_address(isolate());
4741 __ mov(ip, Operand(debug_is_active)); 4741 __ mov(ip, Operand(debug_is_active));
4742 __ lbz(r3, MemOperand(ip)); 4742 __ lbz(r3, MemOperand(ip));
4743 __ SmiTag(r3); 4743 __ SmiTag(r3);
4744 context()->Plug(r3); 4744 context()->Plug(r3);
4745 } 4745 }
4746 4746
4747 4747
4748 void FullCodeGenerator::EmitCallSuperWithSpread(CallRuntime* expr) {
4749 // Assert: expr === CallRuntime("ReflectConstruct")
4750 DCHECK_EQ(1, expr->arguments()->length());
4751 CallRuntime* call = expr->arguments()->at(0)->AsCallRuntime();
4752
4753 ZoneList<Expression*>* args = call->arguments();
4754 DCHECK_EQ(3, args->length());
4755
4756 SuperCallReference* super_call_ref = args->at(0)->AsSuperCallReference();
4757 DCHECK_NOT_NULL(super_call_ref);
4758
4759 // Load ReflectConstruct function
4760 EmitLoadJSRuntimeFunction(call);
4761
4762 // Push the target function under the receiver.
4763 __ LoadP(r0, MemOperand(sp, 0));
4764 __ push(r0);
4765 __ StoreP(r3, MemOperand(sp, kPointerSize));
4766
4767 // Push super constructor
4768 EmitLoadSuperConstructor(super_call_ref);
4769 __ Push(result_register());
4770
4771 // Push arguments array
4772 VisitForStackValue(args->at(1));
4773
4774 // Push NewTarget
4775 DCHECK(args->at(2)->IsVariableProxy());
4776 VisitForStackValue(args->at(2));
4777
4778 EmitCallJSRuntimeFunction(call);
4779
4780 // Restore context register.
4781 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
4782 context()->DropAndPlug(1, r3);
4783 }
4784
4785
4786 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) { 4748 void FullCodeGenerator::EmitLoadJSRuntimeFunction(CallRuntime* expr) {
4787 // Push the builtins object as the receiver. 4749 // Push the builtins object as the receiver.
4788 Register receiver = LoadDescriptor::ReceiverRegister(); 4750 Register receiver = LoadDescriptor::ReceiverRegister();
4789 __ LoadP(receiver, GlobalObjectOperand()); 4751 __ LoadP(receiver, GlobalObjectOperand());
4790 __ LoadP(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset)); 4752 __ LoadP(receiver, FieldMemOperand(receiver, GlobalObject::kBuiltinsOffset));
4791 __ push(receiver); 4753 __ push(receiver);
4792 4754
4793 // Load the function from the receiver. 4755 // Load the function from the receiver.
4794 __ mov(LoadDescriptor::NameRegister(), Operand(expr->name())); 4756 __ mov(LoadDescriptor::NameRegister(), Operand(expr->name()));
4795 __ mov(LoadDescriptor::SlotRegister(), 4757 __ mov(LoadDescriptor::SlotRegister(),
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
5593 return ON_STACK_REPLACEMENT; 5555 return ON_STACK_REPLACEMENT;
5594 } 5556 }
5595 5557
5596 DCHECK(interrupt_address == 5558 DCHECK(interrupt_address ==
5597 isolate->builtins()->OsrAfterStackCheck()->entry()); 5559 isolate->builtins()->OsrAfterStackCheck()->entry());
5598 return OSR_AFTER_STACK_CHECK; 5560 return OSR_AFTER_STACK_CHECK;
5599 } 5561 }
5600 } // namespace internal 5562 } // namespace internal
5601 } // namespace v8 5563 } // namespace v8
5602 #endif // V8_TARGET_ARCH_PPC 5564 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698