Index: src/compiler/bytecode-graph-builder.cc |
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc |
index a64f1fb509fe39a186044d82a582d5158eaea1dd..e3d8b6247bb04c55a0be5c0d60590a168abef48c 100644 |
--- a/src/compiler/bytecode-graph-builder.cc |
+++ b/src/compiler/bytecode-graph-builder.cc |
@@ -508,6 +508,12 @@ bool BytecodeGraphBuilder::CreateGraph(bool stack_check) { |
void BytecodeGraphBuilder::CreateGraphBody(bool stack_check) { |
// TODO(oth): Review ast-graph-builder equivalent, i.e. arguments |
// object setup, this function variable if used, tracing hooks. |
+ |
+ if (stack_check) { |
+ Node* node = NewNode(javascript()->StackCheck()); |
+ PrepareEntryFrameState(node); |
+ } |
+ |
VisitBytecodes(); |
} |
@@ -1863,6 +1869,16 @@ Node** BytecodeGraphBuilder::EnsureInputBufferSize(int size) { |
} |
+void BytecodeGraphBuilder::PrepareEntryFrameState(Node* node) { |
+ DCHECK_EQ(1, OperatorProperties::GetFrameStateInputCount(node->op())); |
+ DCHECK_EQ(IrOpcode::kDead, |
+ NodeProperties::GetFrameStateInput(node, 0)->opcode()); |
+ NodeProperties::ReplaceFrameStateInput( |
+ node, 0, environment()->Checkpoint(BailoutId(0), |
+ OutputFrameStateCombine::Ignore())); |
+} |
+ |
+ |
Node* BytecodeGraphBuilder::MakeNode(const Operator* op, int value_input_count, |
Node** value_inputs, bool incomplete) { |
DCHECK_EQ(op->ValueInputCount(), value_input_count); |