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

Unified Diff: src/compiler/pipeline.cc

Issue 1114163005: [turbofan] Fix tail call optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 5e51c454cda8b73d296b443015f17a472b88c2e2..a3fe262258830fc2730f455c1d1ccdd76eea40d1 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -44,6 +44,7 @@
#include "src/compiler/select-lowering.h"
#include "src/compiler/simplified-lowering.h"
#include "src/compiler/simplified-operator-reducer.h"
+#include "src/compiler/tail-call-optimization.h"
#include "src/compiler/typer.h"
#include "src/compiler/value-numbering-reducer.h"
#include "src/compiler/verifier.h"
@@ -688,9 +689,12 @@ struct GenericLoweringPhase {
JSGenericLowering generic(data->info()->is_typing_enabled(),
data->jsgraph());
SelectLowering select(data->jsgraph()->graph(), data->jsgraph()->common());
+ TailCallOptimization tco(data->common(), data->graph());
GraphReducer graph_reducer(data->graph(), temp_zone);
AddReducer(data, &graph_reducer, &generic);
AddReducer(data, &graph_reducer, &select);
+ // TODO(turbofan): TCO is currently limited to stubs.
+ if (data->info()->IsStub()) AddReducer(data, &graph_reducer, &tco);
graph_reducer.ReduceGraph();
}
};

Powered by Google App Engine
This is Rietveld 408576698