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); |