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

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 2447383002: [turbofan] Disable bogus lowering of builtin tail-calls. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-658691.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index 9f6700bda614e51e88db0bfaa1521694cbcaeaaf..61d767bbb1aae923463ae0ae8fcc2b22ada131b9 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -1672,6 +1672,7 @@ void ReduceBuiltin(Isolate* isolate, JSGraph* jsgraph, Node* node,
const bool is_construct = (node->opcode() == IrOpcode::kJSCallConstruct);
DCHECK(Builtins::HasCppImplementation(builtin_index));
+ DCHECK_EQ(0, flags & CallDescriptor::kSupportsTailCalls);
Node* target = NodeProperties::GetValueInput(node, 0);
Node* new_target = is_construct
@@ -1877,7 +1878,8 @@ Reduction JSTypedLowering::ReduceJSCallFunction(Node* node) {
node, common()->Call(Linkage::GetStubCallDescriptor(
isolate(), graph()->zone(), callable.descriptor(),
1 + arity, flags)));
- } else if (is_builtin && Builtins::HasCppImplementation(builtin_index)) {
+ } else if (is_builtin && Builtins::HasCppImplementation(builtin_index) &&
jgruber 2016/10/26 11:22:59 ReduceBuiltin is also called from ReduceJSCallCons
Michael Starzinger 2016/10/26 11:35:54 Acknowledged. Constructor calls cannot be in tail-
+ ((flags & CallDescriptor::kSupportsTailCalls) == 0)) {
// Patch {node} to a direct CEntryStub call.
ReduceBuiltin(isolate(), jsgraph(), node, builtin_index, arity, flags);
} else {
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-658691.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698