OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include "src/compiler/instruction-selector-impl.h" | 7 #include "src/compiler/instruction-selector-impl.h" |
8 #include "src/compiler/node-matchers.h" | 8 #include "src/compiler/node-matchers.h" |
9 #include "src/compiler/node-properties-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
10 #include "src/compiler/pipeline.h" | 10 #include "src/compiler/pipeline.h" |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 | 1053 |
1054 | 1054 |
1055 void InstructionSelector::AddFrameStateInputs( | 1055 void InstructionSelector::AddFrameStateInputs( |
1056 Node* state, InstructionOperandVector* inputs, | 1056 Node* state, InstructionOperandVector* inputs, |
1057 FrameStateDescriptor* descriptor) { | 1057 FrameStateDescriptor* descriptor) { |
1058 DCHECK_EQ(IrOpcode::kFrameState, state->op()->opcode()); | 1058 DCHECK_EQ(IrOpcode::kFrameState, state->op()->opcode()); |
1059 | 1059 |
1060 Node* parameters = state->InputAt(0); | 1060 Node* parameters = state->InputAt(0); |
1061 Node* locals = state->InputAt(1); | 1061 Node* locals = state->InputAt(1); |
1062 Node* stack = state->InputAt(2); | 1062 Node* stack = state->InputAt(2); |
| 1063 Node* context = state->InputAt(3); |
| 1064 |
| 1065 DCHECK_EQ(IrOpcode::kStateValues, parameters->op()->opcode()); |
| 1066 DCHECK_EQ(IrOpcode::kStateValues, locals->op()->opcode()); |
| 1067 DCHECK_EQ(IrOpcode::kStateValues, stack->op()->opcode()); |
1063 | 1068 |
1064 DCHECK_EQ(descriptor->parameters_count(), parameters->InputCount()); | 1069 DCHECK_EQ(descriptor->parameters_count(), parameters->InputCount()); |
1065 DCHECK_EQ(descriptor->locals_count(), locals->InputCount()); | 1070 DCHECK_EQ(descriptor->locals_count(), locals->InputCount()); |
1066 DCHECK_EQ(descriptor->stack_count(), stack->InputCount()); | 1071 DCHECK_EQ(descriptor->stack_count(), stack->InputCount()); |
1067 | 1072 |
1068 OperandGenerator g(this); | 1073 OperandGenerator g(this); |
1069 for (int i = 0; i < descriptor->parameters_count(); i++) { | 1074 for (int i = 0; i < descriptor->parameters_count(); i++) { |
1070 inputs->push_back(UseOrImmediate(&g, parameters->InputAt(i))); | 1075 inputs->push_back(UseOrImmediate(&g, parameters->InputAt(i))); |
1071 } | 1076 } |
| 1077 inputs->push_back(UseOrImmediate(&g, context)); |
1072 for (int i = 0; i < descriptor->locals_count(); i++) { | 1078 for (int i = 0; i < descriptor->locals_count(); i++) { |
1073 inputs->push_back(UseOrImmediate(&g, locals->InputAt(i))); | 1079 inputs->push_back(UseOrImmediate(&g, locals->InputAt(i))); |
1074 } | 1080 } |
1075 for (int i = 0; i < descriptor->stack_count(); i++) { | 1081 for (int i = 0; i < descriptor->stack_count(); i++) { |
1076 inputs->push_back(UseOrImmediate(&g, stack->InputAt(i))); | 1082 inputs->push_back(UseOrImmediate(&g, stack->InputAt(i))); |
1077 } | 1083 } |
1078 } | 1084 } |
1079 | 1085 |
1080 | 1086 |
1081 void InstructionSelector::VisitDeoptimize(Node* deopt) { | 1087 void InstructionSelector::VisitDeoptimize(Node* deopt) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 | 1142 |
1137 | 1143 |
1138 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, | 1144 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, |
1139 BasicBlock* deoptimization) {} | 1145 BasicBlock* deoptimization) {} |
1140 | 1146 |
1141 #endif // !V8_TURBOFAN_BACKEND | 1147 #endif // !V8_TURBOFAN_BACKEND |
1142 | 1148 |
1143 } // namespace compiler | 1149 } // namespace compiler |
1144 } // namespace internal | 1150 } // namespace internal |
1145 } // namespace v8 | 1151 } // namespace v8 |
OLD | NEW |