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/graph-unittest.h" | 5 #include "src/compiler/graph-unittest.h" |
6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
7 #include "src/compiler/simplified-operator.h" | 7 #include "src/compiler/simplified-operator.h" |
8 #include "src/compiler/simplified-operator-reducer.h" | 8 #include "src/compiler/simplified-operator-reducer.h" |
9 #include "src/compiler/typer.h" | 9 #include "src/compiler/typer.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 } // namespace | 121 } // namespace |
122 | 122 |
123 | 123 |
124 // ----------------------------------------------------------------------------- | 124 // ----------------------------------------------------------------------------- |
125 // Unary operators | 125 // Unary operators |
126 | 126 |
127 | 127 |
128 namespace { | 128 namespace { |
129 | 129 |
130 struct UnaryOperator { | 130 struct UnaryOperator { |
131 Operator* (SimplifiedOperatorBuilder::*constructor)() const; | 131 const Operator* (SimplifiedOperatorBuilder::*constructor)() const; |
132 const char* constructor_name; | 132 const char* constructor_name; |
133 }; | 133 }; |
134 | 134 |
135 | 135 |
136 std::ostream& operator<<(std::ostream& os, const UnaryOperator& unop) { | 136 std::ostream& operator<<(std::ostream& os, const UnaryOperator& unop) { |
137 return os << unop.constructor_name; | 137 return os << unop.constructor_name; |
138 } | 138 } |
139 | 139 |
140 | 140 |
141 static const UnaryOperator kUnaryOperators[] = { | 141 static const UnaryOperator kUnaryOperators[] = { |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 Reduce(graph()->NewNode(simplified()->ChangeUint32ToTagged(), | 472 Reduce(graph()->NewNode(simplified()->ChangeUint32ToTagged(), |
473 Int32Constant(bit_cast<int32_t>(n)))); | 473 Int32Constant(bit_cast<int32_t>(n)))); |
474 ASSERT_TRUE(reduction.Changed()); | 474 ASSERT_TRUE(reduction.Changed()); |
475 EXPECT_THAT(reduction.replacement(), IsNumberConstant(FastUI2D(n))); | 475 EXPECT_THAT(reduction.replacement(), IsNumberConstant(FastUI2D(n))); |
476 } | 476 } |
477 } | 477 } |
478 | 478 |
479 } // namespace compiler | 479 } // namespace compiler |
480 } // namespace internal | 480 } // namespace internal |
481 } // namespace v8 | 481 } // namespace v8 |
OLD | NEW |