| 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_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ | 5 #ifndef V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ |
| 6 #define V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ | 6 #define V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ |
| 7 | 7 |
| 8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
| 9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
| 10 #include "src/compiler/typer.h" | 10 #include "src/compiler/typer.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 using ::testing::Matcher; | 26 using ::testing::Matcher; |
| 27 | 27 |
| 28 | 28 |
| 29 class GraphTest : public TestWithContext, public TestWithZone { | 29 class GraphTest : public TestWithContext, public TestWithZone { |
| 30 public: | 30 public: |
| 31 explicit GraphTest(int num_parameters = 1); | 31 explicit GraphTest(int num_parameters = 1); |
| 32 ~GraphTest() OVERRIDE; | 32 ~GraphTest() OVERRIDE; |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 Node* start() { return graph()->start(); } |
| 35 Node* Parameter(int32_t index = 0); | 36 Node* Parameter(int32_t index = 0); |
| 36 Node* Float32Constant(volatile float value); | 37 Node* Float32Constant(volatile float value); |
| 37 Node* Float64Constant(volatile double value); | 38 Node* Float64Constant(volatile double value); |
| 38 Node* Int32Constant(int32_t value); | 39 Node* Int32Constant(int32_t value); |
| 39 Node* Uint32Constant(uint32_t value) { | 40 Node* Uint32Constant(uint32_t value) { |
| 40 return Int32Constant(bit_cast<int32_t>(value)); | 41 return Int32Constant(bit_cast<int32_t>(value)); |
| 41 } | 42 } |
| 42 Node* Int64Constant(int64_t value); | 43 Node* Int64Constant(int64_t value); |
| 43 Node* NumberConstant(volatile double value); | 44 Node* NumberConstant(volatile double value); |
| 44 Node* HeapConstant(const Handle<HeapObject>& value); | 45 Node* HeapConstant(const Handle<HeapObject>& value); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 Typer typer_; | 75 Typer typer_; |
| 75 }; | 76 }; |
| 76 | 77 |
| 77 } // namespace compiler | 78 } // namespace compiler |
| 78 } // namespace internal | 79 } // namespace internal |
| 79 } // namespace v8 | 80 } // namespace v8 |
| 80 | 81 |
| 81 #endif // V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ | 82 #endif // V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_ |
| OLD | NEW |