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

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

Issue 1216933011: [turbofan] Enable tail calls for %_CallFunction. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix platform ports 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/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/js-intrinsic-lowering.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/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 node->set_op(common()->Call(desc)); 522 node->set_op(common()->Call(desc));
523 } 523 }
524 524
525 525
526 void JSGenericLowering::LowerJSCallFunction(Node* node) { 526 void JSGenericLowering::LowerJSCallFunction(Node* node) {
527 const CallFunctionParameters& p = CallFunctionParametersOf(node->op()); 527 const CallFunctionParameters& p = CallFunctionParametersOf(node->op());
528 int arg_count = static_cast<int>(p.arity() - 2); 528 int arg_count = static_cast<int>(p.arity() - 2);
529 CallFunctionStub stub(isolate(), arg_count, p.flags()); 529 CallFunctionStub stub(isolate(), arg_count, p.flags());
530 CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor(); 530 CallInterfaceDescriptor d = stub.GetCallInterfaceDescriptor();
531 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 531 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
532 if (p.AllowTailCalls()) {
533 flags |= CallDescriptor::kSupportsTailCalls;
534 }
532 CallDescriptor* desc = Linkage::GetStubCallDescriptor( 535 CallDescriptor* desc = Linkage::GetStubCallDescriptor(
533 isolate(), zone(), d, static_cast<int>(p.arity() - 1), flags); 536 isolate(), zone(), d, static_cast<int>(p.arity() - 1), flags);
534 Node* stub_code = jsgraph()->HeapConstant(stub.GetCode()); 537 Node* stub_code = jsgraph()->HeapConstant(stub.GetCode());
535 node->InsertInput(zone(), 0, stub_code); 538 node->InsertInput(zone(), 0, stub_code);
536 node->set_op(common()->Call(desc)); 539 node->set_op(common()->Call(desc));
537 } 540 }
538 541
539 542
540 void JSGenericLowering::LowerJSCallRuntime(Node* node) { 543 void JSGenericLowering::LowerJSCallRuntime(Node* node) {
541 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op()); 544 const CallRuntimeParameters& p = CallRuntimeParametersOf(node->op());
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 } 809 }
807 810
808 811
809 MachineOperatorBuilder* JSGenericLowering::machine() const { 812 MachineOperatorBuilder* JSGenericLowering::machine() const {
810 return jsgraph()->machine(); 813 return jsgraph()->machine();
811 } 814 }
812 815
813 } // namespace compiler 816 } // namespace compiler
814 } // namespace internal 817 } // namespace internal
815 } // namespace v8 818 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/instruction-selector-ia32.cc ('k') | src/compiler/js-intrinsic-lowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698