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 #ifndef V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
6 #define V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
7 | 7 |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/instruction-selector.h" | 9 #include "src/compiler/instruction-selector.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 Generate(); | 232 Generate(); |
233 return code_.ToHandleChecked(); | 233 return code_.ToHandleChecked(); |
234 } | 234 } |
235 | 235 |
236 protected: | 236 protected: |
237 Node* MakeNode(const Operator* op, int value_input_count, | 237 Node* MakeNode(const Operator* op, int value_input_count, |
238 Node** value_inputs) { | 238 Node** value_inputs) { |
239 CHECK_EQ(op->ValueInputCount(), value_input_count); | 239 CHECK_EQ(op->ValueInputCount(), value_input_count); |
240 | 240 |
241 CHECK(!OperatorProperties::HasContextInput(op)); | 241 CHECK(!OperatorProperties::HasContextInput(op)); |
242 CHECK_EQ(0, OperatorProperties::GetFrameStateInputCount(op)); | 242 CHECK(!OperatorProperties::HasFrameStateInput(op)); |
243 bool has_control = op->ControlInputCount() == 1; | 243 bool has_control = op->ControlInputCount() == 1; |
244 bool has_effect = op->EffectInputCount() == 1; | 244 bool has_effect = op->EffectInputCount() == 1; |
245 | 245 |
246 CHECK_LT(op->ControlInputCount(), 2); | 246 CHECK_LT(op->ControlInputCount(), 2); |
247 CHECK_LT(op->EffectInputCount(), 2); | 247 CHECK_LT(op->EffectInputCount(), 2); |
248 | 248 |
249 Node* result = NULL; | 249 Node* result = NULL; |
250 if (!has_control && !has_effect) { | 250 if (!has_control && !has_effect) { |
251 result = graph()->NewNode(op, value_input_count, value_inputs); | 251 result = graph()->NewNode(op, value_input_count, value_inputs); |
252 } else { | 252 } else { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 Node* return_; | 304 Node* return_; |
305 Node** parameters_; | 305 Node** parameters_; |
306 MaybeHandle<Code> code_; | 306 MaybeHandle<Code> code_; |
307 }; | 307 }; |
308 | 308 |
309 } // namespace compiler | 309 } // namespace compiler |
310 } // namespace internal | 310 } // namespace internal |
311 } // namespace v8 | 311 } // namespace v8 |
312 | 312 |
313 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 313 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
OLD | NEW |