Chromium Code Reviews| Index: src/compiler/bytecode-graph-builder.cc |
| diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc |
| index 69f39f6ad5e5a98fc708d77d4372333d45827aab..45435653ee85466c4a0c71f8e114c83241978f6a 100644 |
| --- a/src/compiler/bytecode-graph-builder.cc |
| +++ b/src/compiler/bytecode-graph-builder.cc |
| @@ -533,8 +533,7 @@ VectorSlotPair BytecodeGraphBuilder::CreateVectorSlotPair(int slot_id) { |
| return VectorSlotPair(feedback_vector, slot); |
| } |
| - |
| -bool BytecodeGraphBuilder::CreateGraph(bool stack_check) { |
| +bool BytecodeGraphBuilder::CreateGraph() { |
| // Set up the basic structure of the graph. Outputs for {Start} are |
| // the formal parameters (including the receiver) plus context and |
| // closure. |
| @@ -550,7 +549,7 @@ bool BytecodeGraphBuilder::CreateGraph(bool stack_check) { |
| GetFunctionContext()); |
| set_environment(&env); |
| - CreateGraphBody(stack_check); |
| + CreateGraphBody(); |
| // Finish the basic structure of the graph. |
| DCHECK_NE(0u, exit_controls_.size()); |
| @@ -562,16 +561,9 @@ bool BytecodeGraphBuilder::CreateGraph(bool stack_check) { |
| return true; |
| } |
| - |
| -void BytecodeGraphBuilder::CreateGraphBody(bool stack_check) { |
| +void BytecodeGraphBuilder::CreateGraphBody() { |
|
Michael Starzinger
2016/02/03 16:13:17
I think we can get rid of the CreateGraphBody meth
rmcilroy
2016/02/04 11:55:15
Done.
|
| // 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(); |
| } |
| @@ -1515,6 +1507,12 @@ void BytecodeGraphBuilder::VisitJumpIfUndefinedConstantWide() { |
| BuildJumpIfEqual(jsgraph()->UndefinedConstant()); |
| } |
| +void BytecodeGraphBuilder::VisitStackCheck() { |
| + FrameStateBeforeAndAfter states(this); |
| + Node* node = NewNode(javascript()->StackCheck()); |
| + environment()->RecordAfterState(node, &states); |
| +} |
| + |
| void BytecodeGraphBuilder::VisitReturn() { |
| Node* control = |
| NewNode(common()->Return(), environment()->LookupAccumulator()); |
| @@ -1671,16 +1669,6 @@ void BytecodeGraphBuilder::EnterAndExitExceptionHandlers(int current_offset) { |
| } |
| } |
| -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); |