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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 1842763002: [api] Add a switch that controls if ES2015 tail call elimination feature is enabled or not. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-dynamic
Patch Set: Added workaround and TODO to investigate TurboFan issue. Created 4 years, 9 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/api.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index 284edfa0abf5f72bb9aee67297e13ac558df6c99..2249cbcb3f52d9e1be32458f305ab5d89b92ffdd 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -927,7 +927,13 @@ void BytecodeGraphBuilder::BuildCall(TailCallMode tail_call_mode) {
void BytecodeGraphBuilder::VisitCall() { BuildCall(TailCallMode::kDisallow); }
-void BytecodeGraphBuilder::VisitTailCall() { BuildCall(TailCallMode::kAllow); }
+void BytecodeGraphBuilder::VisitTailCall() {
+ TailCallMode tail_call_mode =
+ bytecode_array_->GetIsolate()->is_tail_call_elimination_enabled()
+ ? TailCallMode::kAllow
+ : TailCallMode::kDisallow;
+ BuildCall(tail_call_mode);
+}
void BytecodeGraphBuilder::VisitCallJSRuntime() {
FrameStateBeforeAndAfter states(this);
« no previous file with comments | « src/api.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698