| 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/v8.h" | 5 #include "src/v8.h" |
| 6 #include "test/cctest/cctest.h" | 6 #include "test/cctest/cctest.h" |
| 7 | 7 |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
| 10 #include "src/compiler/control-reducer.h" | 10 #include "src/compiler/control-reducer.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 // A helper for all tests dealing with ControlTester. | 60 // A helper for all tests dealing with ControlTester. |
| 61 class ControlReducerTester : HandleAndZoneScope { | 61 class ControlReducerTester : HandleAndZoneScope { |
| 62 public: | 62 public: |
| 63 ControlReducerTester() | 63 ControlReducerTester() |
| 64 : isolate(main_isolate()), | 64 : isolate(main_isolate()), |
| 65 common(main_zone()), | 65 common(main_zone()), |
| 66 graph(main_zone()), | 66 graph(main_zone()), |
| 67 jsgraph(&graph, &common, NULL, NULL), | 67 jsgraph(main_isolate(), &graph, &common, NULL, NULL), |
| 68 start(graph.NewNode(common.Start(1))), | 68 start(graph.NewNode(common.Start(1))), |
| 69 end(graph.NewNode(common.End(), start)), | 69 end(graph.NewNode(common.End(), start)), |
| 70 p0(graph.NewNode(common.Parameter(0), start)), | 70 p0(graph.NewNode(common.Parameter(0), start)), |
| 71 zero(jsgraph.Int32Constant(0)), | 71 zero(jsgraph.Int32Constant(0)), |
| 72 one(jsgraph.OneConstant()), | 72 one(jsgraph.OneConstant()), |
| 73 half(jsgraph.Constant(0.5)), | 73 half(jsgraph.Constant(0.5)), |
| 74 self(graph.NewNode(common.Int32Constant(0xaabbccdd))), | 74 self(graph.NewNode(common.Int32Constant(0xaabbccdd))), |
| 75 dead(graph.NewNode(common.Dead())) { | 75 dead(graph.NewNode(common.Dead())) { |
| 76 graph.SetEnd(end); | 76 graph.SetEnd(end); |
| 77 graph.SetStart(start); | 77 graph.SetStart(start); |
| (...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1667 | 1667 |
| 1668 Node* ret = R.Return(d1.phi, R.start, d1.merge); | 1668 Node* ret = R.Return(d1.phi, R.start, d1.merge); |
| 1669 | 1669 |
| 1670 R.ReduceGraph(); // d1 gets folded true. | 1670 R.ReduceGraph(); // d1 gets folded true. |
| 1671 | 1671 |
| 1672 CheckInputs(ret, y2, R.start, R.start); | 1672 CheckInputs(ret, y2, R.start, R.start); |
| 1673 CheckDeadDiamond(d1); | 1673 CheckDeadDiamond(d1); |
| 1674 CheckDeadDiamond(d2); | 1674 CheckDeadDiamond(d2); |
| 1675 CheckDeadDiamond(d3); | 1675 CheckDeadDiamond(d3); |
| 1676 } | 1676 } |
| OLD | NEW |