Index: src/compiler/ast-graph-builder.cc |
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc |
index 03640780b656186b653eb05aba656d5093553e76..5c61471660cc3cc446f2cf51050bfbd0cd1d3860 100644 |
--- a/src/compiler/ast-graph-builder.cc |
+++ b/src/compiler/ast-graph-builder.cc |
@@ -224,7 +224,7 @@ Node* AstGraphBuilder::Environment::Checkpoint( |
UpdateStateValues(&stack_node_, parameters_count() + locals_count(), |
stack_height()); |
- const Operator* op = common()->FrameState(JS_FRAME, ast_id, combine); |
+ const Operator* op = common()->FrameState(ast_id, combine); |
return graph()->NewNode(op, parameters_node_, locals_node_, stack_node_, |
GetContext(), |
@@ -2020,10 +2020,12 @@ Node* AstGraphBuilder::BuildBinaryOp(Node* left, Node* right, Token::Value op) { |
void AstGraphBuilder::PrepareFrameState(Node* node, BailoutId ast_id, |
OutputFrameStateCombine combine) { |
if (OperatorProperties::HasFrameStateInput(node->op())) { |
- DCHECK(NodeProperties::GetFrameStateInput(node)->opcode() == |
- IrOpcode::kDead); |
- NodeProperties::ReplaceFrameStateInput( |
- node, environment()->Checkpoint(ast_id, combine)); |
+ int frame_state_index = NodeProperties::GetFrameStateIndex(node); |
+ |
+ DCHECK(node->InputAt(frame_state_index)->op()->opcode() == IrOpcode::kDead); |
+ |
+ Node* frame_state_node = environment()->Checkpoint(ast_id, combine); |
+ node->ReplaceInput(frame_state_index, frame_state_node); |
} |
} |