Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index ddf9b9bbcfd451f37add57cf7e396f91ae1ea6d4..42f713417a1b65c60b86c950062fe19f945ec377 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -418,11 +418,13 @@ class AstGraphBuilder::FrameStateBeforeAndAfter { |
frame_state_before_ = id_before == BailoutId::None() |
? builder_->GetEmptyFrameState() |
: builder_->environment()->Checkpoint(id_before); |
- // Create an explicit checkpoint node for before the operation. |
- Node* node = builder_->NewNode(builder_->common()->Checkpoint()); |
- DCHECK_EQ(IrOpcode::kDead, |
- NodeProperties::GetFrameStateInput(node, 0)->opcode()); |
- NodeProperties::ReplaceFrameStateInput(node, 0, frame_state_before_); |
+ if (id_before != BailoutId::None()) { |
+ // Create an explicit checkpoint node for before the operation. |
+ Node* node = builder_->NewNode(builder_->common()->Checkpoint()); |
+ DCHECK_EQ(IrOpcode::kDead, |
+ NodeProperties::GetFrameStateInput(node, 0)->opcode()); |
+ NodeProperties::ReplaceFrameStateInput(node, 0, frame_state_before_); |
+ } |
} |
void AddToNode( |