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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 2639233002: [Turbofan] Add CallFunctionWithSpread JSOperator. (Closed)
Patch Set: Set CL dependency to bytecode CL Created 3 years, 11 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/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-operator.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/compiler/js-generic-lowering.h" 5 #include "src/compiler/js-generic-lowering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/builtins/builtins-constructor.h" 8 #include "src/builtins/builtins-constructor.h"
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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 } 541 }
542 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 542 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
543 isolate(), zone(), callable.descriptor(), arg_count + 1, flags); 543 isolate(), zone(), callable.descriptor(), arg_count + 1, flags);
544 Node* stub_code = jsgraph()->HeapConstant(callable.code()); 544 Node* stub_code = jsgraph()->HeapConstant(callable.code());
545 Node* stub_arity = jsgraph()->Int32Constant(arg_count); 545 Node* stub_arity = jsgraph()->Int32Constant(arg_count);
546 node->InsertInput(zone(), 0, stub_code); 546 node->InsertInput(zone(), 0, stub_code);
547 node->InsertInput(zone(), 2, stub_arity); 547 node->InsertInput(zone(), 2, stub_arity);
548 NodeProperties::ChangeOp(node, common()->Call(desc)); 548 NodeProperties::ChangeOp(node, common()->Call(desc));
549 } 549 }
550 550
551 void JSGenericLowering::LowerJSCallFunctionWithSpread(Node* node) {
552 CallFunctionWithSpreadParameters const& p =
553 CallFunctionWithSpreadParametersOf(node->op());
554 ReplaceWithRuntimeCall(node, Runtime::kCallWithSpread,
555 static_cast<int>(p.arity()));
556 }
551 557
552 void JSGenericLowering::LowerJSCallRuntime(Node* node) { 558 void JSGenericLowering::LowerJSCallRuntime(Node* node) {
553 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); 559 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op());
554 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity())); 560 ReplaceWithRuntimeCall(node, p.id(), static_cast<int>(p.arity()));
555 } 561 }
556 562
557 void JSGenericLowering::LowerJSConvertReceiver(Node* node) { 563 void JSGenericLowering::LowerJSConvertReceiver(Node* node) {
558 ReplaceWithRuntimeCall(node, Runtime::kConvertReceiver); 564 ReplaceWithRuntimeCall(node, Runtime::kConvertReceiver);
559 } 565 }
560 566
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 } 659 }
654 660
655 661
656 MachineOperatorBuilder* JSGenericLowering::machine() const { 662 MachineOperatorBuilder* JSGenericLowering::machine() const {
657 return jsgraph()->machine(); 663 return jsgraph()->machine();
658 } 664 }
659 665
660 } // namespace compiler 666 } // namespace compiler
661 } // namespace internal 667 } // namespace internal
662 } // namespace v8 668 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698