Chromium Code Reviews| Index: src/compiler/instruction-selector.cc |
| diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
| index 733624e86622f16e253309a0b1749fd004efed77..74d40bde9c855a44bf8977d4e00b91008afd3613 100644 |
| --- a/src/compiler/instruction-selector.cc |
| +++ b/src/compiler/instruction-selector.cc |
| @@ -1027,15 +1027,19 @@ void InstructionSelector::VisitThrow(Node* value) { |
| FrameStateDescriptor* InstructionSelector::GetFrameStateDescriptor( |
| Node* state) { |
| - DCHECK(state->op()->opcode() == IrOpcode::kFrameState); |
| + DCHECK(state->opcode() == IrOpcode::kFrameState); |
| + DCHECK_EQ(4, state->InputCount()); |
| BailoutId ast_id = OpParameter<BailoutId>(state); |
| - Node* parameters = state->InputAt(0); |
| - Node* locals = state->InputAt(1); |
| - Node* stack = state->InputAt(2); |
| + int parameters = OpParameter<int>(state->InputAt(0)); |
| + int locals = OpParameter<int>(state->InputAt(1)); |
| + int stack = OpParameter<int>(state->InputAt(2)); |
| + FrameStateDescriptor* parent = NULL; |
| + if (state->InputAt(3)->opcode() == IrOpcode::kFrameState) { |
| + parent = GetFrameStateDescriptor(state->InputAt(3)); |
| + } |
| return new (instruction_zone()) |
| - FrameStateDescriptor(ast_id, OpParameter<int>(parameters), |
| - OpParameter<int>(locals), OpParameter<int>(stack)); |
| + FrameStateDescriptor(ast_id, parameters, locals, stack, parent); |
| } |
| @@ -1075,6 +1079,10 @@ void InstructionSelector::AddFrameStateInputs( |
| for (int i = 0; i < descriptor->stack_count(); i++) { |
| inputs->push_back(UseOrImmediate(&g, stack->InputAt(i))); |
| } |
| + |
| + if (descriptor->parent() != NULL) { |
|
Jarin
2014/08/29 15:07:07
Could you recurse first? (So that the outer guys a
sigurds
2014/09/01 08:48:18
Done.
|
| + AddFrameStateInputs(state->InputAt(3), inputs, descriptor->parent()); |
| + } |
| } |