| 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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 | 1030 |
| 1031 DCHECK_EQ(IrOpcode::kStateValues, parameters->op()->opcode()); | 1031 DCHECK_EQ(IrOpcode::kStateValues, parameters->op()->opcode()); |
| 1032 DCHECK_EQ(IrOpcode::kStateValues, locals->op()->opcode()); | 1032 DCHECK_EQ(IrOpcode::kStateValues, locals->op()->opcode()); |
| 1033 DCHECK_EQ(IrOpcode::kStateValues, stack->op()->opcode()); | 1033 DCHECK_EQ(IrOpcode::kStateValues, stack->op()->opcode()); |
| 1034 | 1034 |
| 1035 DCHECK_EQ(descriptor->parameters_count(), parameters->InputCount()); | 1035 DCHECK_EQ(descriptor->parameters_count(), parameters->InputCount()); |
| 1036 DCHECK_EQ(descriptor->locals_count(), locals->InputCount()); | 1036 DCHECK_EQ(descriptor->locals_count(), locals->InputCount()); |
| 1037 DCHECK_EQ(descriptor->stack_count(), stack->InputCount()); | 1037 DCHECK_EQ(descriptor->stack_count(), stack->InputCount()); |
| 1038 | 1038 |
| 1039 OperandGenerator g(this); | 1039 OperandGenerator g(this); |
| 1040 for (int i = 0; i < static_cast<int>(descriptor->parameters_count()); i++) { | 1040 for (int i = 0; i < descriptor->parameters_count(); i++) { |
| 1041 inputs->push_back(UseOrImmediate(&g, parameters->InputAt(i))); | 1041 inputs->push_back(UseOrImmediate(&g, parameters->InputAt(i))); |
| 1042 } | 1042 } |
| 1043 if (descriptor->HasContext()) { | 1043 inputs->push_back(UseOrImmediate(&g, context)); |
| 1044 inputs->push_back(UseOrImmediate(&g, context)); | 1044 for (int i = 0; i < descriptor->locals_count(); i++) { |
| 1045 } | |
| 1046 for (int i = 0; i < static_cast<int>(descriptor->locals_count()); i++) { | |
| 1047 inputs->push_back(UseOrImmediate(&g, locals->InputAt(i))); | 1045 inputs->push_back(UseOrImmediate(&g, locals->InputAt(i))); |
| 1048 } | 1046 } |
| 1049 for (int i = 0; i < static_cast<int>(descriptor->stack_count()); i++) { | 1047 for (int i = 0; i < descriptor->stack_count(); i++) { |
| 1050 inputs->push_back(UseOrImmediate(&g, stack->InputAt(i))); | 1048 inputs->push_back(UseOrImmediate(&g, stack->InputAt(i))); |
| 1051 } | 1049 } |
| 1052 } | 1050 } |
| 1053 | 1051 |
| 1054 | 1052 |
| 1055 #if !V8_TURBOFAN_BACKEND | 1053 #if !V8_TURBOFAN_BACKEND |
| 1056 | 1054 |
| 1057 #define DECLARE_UNIMPLEMENTED_SELECTOR(x) \ | 1055 #define DECLARE_UNIMPLEMENTED_SELECTOR(x) \ |
| 1058 void InstructionSelector::Visit##x(Node* node) { UNIMPLEMENTED(); } | 1056 void InstructionSelector::Visit##x(Node* node) { UNIMPLEMENTED(); } |
| 1059 MACHINE_OP_LIST(DECLARE_UNIMPLEMENTED_SELECTOR) | 1057 MACHINE_OP_LIST(DECLARE_UNIMPLEMENTED_SELECTOR) |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1090 | 1088 |
| 1091 | 1089 |
| 1092 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, | 1090 void InstructionSelector::VisitCall(Node* call, BasicBlock* continuation, |
| 1093 BasicBlock* deoptimization) {} | 1091 BasicBlock* deoptimization) {} |
| 1094 | 1092 |
| 1095 #endif // !V8_TURBOFAN_BACKEND | 1093 #endif // !V8_TURBOFAN_BACKEND |
| 1096 | 1094 |
| 1097 } // namespace compiler | 1095 } // namespace compiler |
| 1098 } // namespace internal | 1096 } // namespace internal |
| 1099 } // namespace v8 | 1097 } // namespace v8 |
| OLD | NEW |