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 "test/compiler-unittests/graph-unittest.h" | 5 #include "src/compiler/graph-unittest.h" |
6 | 6 |
7 #include <ostream> // NOLINT(readability/streams) | 7 #include <ostream> // NOLINT(readability/streams) |
8 | 8 |
9 #include "src/compiler/node-properties-inl.h" | 9 #include "src/compiler/node-properties-inl.h" |
10 | 10 |
11 using testing::_; | 11 using testing::_; |
12 using testing::MakeMatcher; | 12 using testing::MakeMatcher; |
13 using testing::MatcherInterface; | 13 using testing::MatcherInterface; |
14 using testing::MatchResultListener; | 14 using testing::MatchResultListener; |
15 using testing::StringMatchResultListener; | 15 using testing::StringMatchResultListener; |
16 | 16 |
17 namespace v8 { | 17 namespace v8 { |
18 namespace internal { | 18 namespace internal { |
19 | 19 |
20 // TODO(bmeurer): Find a new home for these functions. | 20 // TODO(bmeurer): Find a new home for these functions. |
21 template <typename T> | 21 template <typename T> |
22 inline std::ostream& operator<<(std::ostream& os, | 22 inline std::ostream& operator<<(std::ostream& os, |
23 const PrintableUnique<T>& value) { | 23 const PrintableUnique<T>& value) { |
24 return os << value.string(); | 24 return os << value.string(); |
25 } | 25 } |
26 inline std::ostream& operator<<(std::ostream& os, | 26 inline std::ostream& operator<<(std::ostream& os, |
27 const ExternalReference& value) { | 27 const ExternalReference& value) { |
28 OStringStream ost; | 28 OStringStream ost; |
29 compiler::StaticParameterTraits<ExternalReference>::PrintTo(ost, value); | 29 compiler::StaticParameterTraits<ExternalReference>::PrintTo(ost, value); |
30 return os << ost.c_str(); | 30 return os << ost.c_str(); |
31 } | 31 } |
32 | 32 |
33 namespace compiler { | 33 namespace compiler { |
34 | 34 |
35 GraphTest::GraphTest(int num_parameters) : graph_(zone()) { | 35 GraphTest::GraphTest(int num_parameters) : common_(zone()), graph_(zone()) { |
36 graph()->SetStart(graph()->NewNode(common()->Start(num_parameters))); | 36 graph()->SetStart(graph()->NewNode(common()->Start(num_parameters))); |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 GraphTest::~GraphTest() {} | 40 GraphTest::~GraphTest() {} |
41 | 41 |
42 | 42 |
43 Node* GraphTest::Parameter(int32_t index) { | 43 Node* GraphTest::Parameter(int32_t index) { |
44 return graph()->NewNode(common()->Parameter(index), graph()->start()); | 44 return graph()->NewNode(common()->Parameter(index), graph()->start()); |
45 } | 45 } |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 IS_UNOP_MATCHER(ChangeInt32ToInt64) | 749 IS_UNOP_MATCHER(ChangeInt32ToInt64) |
750 IS_UNOP_MATCHER(ChangeUint32ToFloat64) | 750 IS_UNOP_MATCHER(ChangeUint32ToFloat64) |
751 IS_UNOP_MATCHER(ChangeUint32ToUint64) | 751 IS_UNOP_MATCHER(ChangeUint32ToUint64) |
752 IS_UNOP_MATCHER(TruncateFloat64ToInt32) | 752 IS_UNOP_MATCHER(TruncateFloat64ToInt32) |
753 IS_UNOP_MATCHER(TruncateInt64ToInt32) | 753 IS_UNOP_MATCHER(TruncateInt64ToInt32) |
754 #undef IS_UNOP_MATCHER | 754 #undef IS_UNOP_MATCHER |
755 | 755 |
756 } // namespace compiler | 756 } // namespace compiler |
757 } // namespace internal | 757 } // namespace internal |
758 } // namespace v8 | 758 } // namespace v8 |
OLD | NEW |