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/unittests/compiler/graph-unittest.h" | 5 #include "test/unittests/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 #include "src/compiler/simplified-operator.h" | 10 #include "src/compiler/simplified-operator.h" |
11 | 11 |
12 using testing::_; | 12 using testing::_; |
13 using testing::MakeMatcher; | 13 using testing::MakeMatcher; |
14 using testing::MatcherInterface; | 14 using testing::MatcherInterface; |
15 using testing::MatchResultListener; | 15 using testing::MatchResultListener; |
16 using testing::StringMatchResultListener; | 16 using testing::StringMatchResultListener; |
17 | 17 |
18 namespace v8 { | 18 namespace v8 { |
19 namespace internal { | 19 namespace internal { |
20 | |
21 // TODO(bmeurer): Find a new home for these functions. | |
22 template <typename T> | |
23 inline std::ostream& operator<<(std::ostream& os, const Unique<T>& value) { | |
24 return os << *value.handle(); | |
25 } | |
26 inline std::ostream& operator<<(std::ostream& os, | |
27 const ExternalReference& value) { | |
28 compiler::StaticParameterTraits<ExternalReference>::PrintTo(os, value); | |
29 return os; | |
30 } | |
31 | |
32 namespace compiler { | 20 namespace compiler { |
33 | 21 |
34 GraphTest::GraphTest(int num_parameters) : common_(zone()), graph_(zone()) { | 22 GraphTest::GraphTest(int num_parameters) : common_(zone()), graph_(zone()) { |
35 graph()->SetStart(graph()->NewNode(common()->Start(num_parameters))); | 23 graph()->SetStart(graph()->NewNode(common()->Start(num_parameters))); |
36 } | 24 } |
37 | 25 |
38 | 26 |
39 GraphTest::~GraphTest() {} | 27 GraphTest::~GraphTest() {} |
40 | 28 |
41 | 29 |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 IS_UNOP_MATCHER(ChangeUint32ToUint64) | 975 IS_UNOP_MATCHER(ChangeUint32ToUint64) |
988 IS_UNOP_MATCHER(TruncateFloat64ToFloat32) | 976 IS_UNOP_MATCHER(TruncateFloat64ToFloat32) |
989 IS_UNOP_MATCHER(TruncateFloat64ToInt32) | 977 IS_UNOP_MATCHER(TruncateFloat64ToInt32) |
990 IS_UNOP_MATCHER(TruncateInt64ToInt32) | 978 IS_UNOP_MATCHER(TruncateInt64ToInt32) |
991 IS_UNOP_MATCHER(Float64Sqrt) | 979 IS_UNOP_MATCHER(Float64Sqrt) |
992 #undef IS_UNOP_MATCHER | 980 #undef IS_UNOP_MATCHER |
993 | 981 |
994 } // namespace compiler | 982 } // namespace compiler |
995 } // namespace internal | 983 } // namespace internal |
996 } // namespace v8 | 984 } // namespace v8 |
OLD | NEW |