| 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/base/bits.h" | 5 #include "src/base/bits.h" |
| 6 #include "src/compiler/graph-unittest.h" | 6 #include "src/compiler/graph-unittest.h" |
| 7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/machine-operator-reducer.h" | 8 #include "src/compiler/machine-operator-reducer.h" |
| 9 #include "src/compiler/typer.h" | 9 #include "src/compiler/typer.h" |
| 10 | 10 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } // namespace | 158 } // namespace |
| 159 | 159 |
| 160 | 160 |
| 161 // ----------------------------------------------------------------------------- | 161 // ----------------------------------------------------------------------------- |
| 162 // Unary operators | 162 // Unary operators |
| 163 | 163 |
| 164 | 164 |
| 165 namespace { | 165 namespace { |
| 166 | 166 |
| 167 struct UnaryOperator { | 167 struct UnaryOperator { |
| 168 const Operator* (MachineOperatorBuilder::*constructor)() const; | 168 const Operator* (MachineOperatorBuilder::*constructor)(); |
| 169 const char* constructor_name; | 169 const char* constructor_name; |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 | 172 |
| 173 std::ostream& operator<<(std::ostream& os, const UnaryOperator& unop) { | 173 std::ostream& operator<<(std::ostream& os, const UnaryOperator& unop) { |
| 174 return os << unop.constructor_name; | 174 return os << unop.constructor_name; |
| 175 } | 175 } |
| 176 | 176 |
| 177 | 177 |
| 178 static const UnaryOperator kUnaryOperators[] = { | 178 static const UnaryOperator kUnaryOperators[] = { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 r = Reduce(graph()->NewNode(common()->Projection(0), add)); | 531 r = Reduce(graph()->NewNode(common()->Projection(0), add)); |
| 532 ASSERT_TRUE(r.Changed()); | 532 ASSERT_TRUE(r.Changed()); |
| 533 EXPECT_THAT(r.replacement(), IsInt32Constant(z)); | 533 EXPECT_THAT(r.replacement(), IsInt32Constant(z)); |
| 534 } | 534 } |
| 535 } | 535 } |
| 536 } | 536 } |
| 537 | 537 |
| 538 } // namespace compiler | 538 } // namespace compiler |
| 539 } // namespace internal | 539 } // namespace internal |
| 540 } // namespace v8 | 540 } // namespace v8 |
| OLD | NEW |