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