| 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/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
| 6 #include "src/compiler/simplified-operator.h" | 7 #include "src/compiler/simplified-operator.h" |
| 7 #include "src/compiler/simplified-operator-reducer.h" | 8 #include "src/compiler/simplified-operator-reducer.h" |
| 8 #include "src/compiler/typer.h" | 9 #include "src/compiler/typer.h" |
| 9 #include "src/conversions.h" | 10 #include "src/conversions.h" |
| 10 #include "test/compiler-unittests/graph-unittest.h" | |
| 11 | 11 |
| 12 namespace v8 { | 12 namespace v8 { |
| 13 namespace internal { | 13 namespace internal { |
| 14 namespace compiler { | 14 namespace compiler { |
| 15 | 15 |
| 16 class SimplifiedOperatorReducerTest : public GraphTest { | 16 class SimplifiedOperatorReducerTest : public GraphTest { |
| 17 public: | 17 public: |
| 18 explicit SimplifiedOperatorReducerTest(int num_parameters = 1) | 18 explicit SimplifiedOperatorReducerTest(int num_parameters = 1) |
| 19 : GraphTest(num_parameters), simplified_(zone()) {} | 19 : GraphTest(num_parameters), simplified_(zone()) {} |
| 20 virtual ~SimplifiedOperatorReducerTest() {} | 20 virtual ~SimplifiedOperatorReducerTest() {} |
| (...skipping 451 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(BitCast<int32_t>(n)))); | 473 Int32Constant(BitCast<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 |