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

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

Issue 1108563002: Detect simple tail calls (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed index type Created 5 years, 8 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 | « src/compiler/instruction-selector.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc
index 3ebb6bc261fbec929fd2521e820a8779efb6af45..8c5c9b98d67954ecfd84f181b95339ba8952a4f7 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -491,8 +491,10 @@ bool JSGenericLowering::TryLowerDirectJSCall(Node* node) {
context = jsgraph()->HeapConstant(Handle<Context>(function->context()));
}
node->ReplaceInput(index, context);
- CallDescriptor* desc = Linkage::GetJSCallDescriptor(
- zone(), false, 1 + arg_count, FlagsForNode(node));
+ CallDescriptor::Flags flags = FlagsForNode(node);
+ if (is_strict(p.language_mode())) flags |= CallDescriptor::kSupportsTailCalls;
+ CallDescriptor* desc =
+ Linkage::GetJSCallDescriptor(zone(), false, 1 + arg_count, flags);
node->set_op(common()->Call(desc));
return true;
}
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/linkage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698