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 <limits> | 5 #include <limits> |
6 | 6 |
7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
8 #include "src/compiler/change-lowering.h" | 8 #include "src/compiler/change-lowering.h" |
9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
10 #include "src/compiler/graph-reducer.h" | 10 #include "src/compiler/graph-reducer.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 typer.Run(); | 53 typer.Run(); |
54 lowering.LowerAllNodes(); | 54 lowering.LowerAllNodes(); |
55 } | 55 } |
56 | 56 |
57 void LowerAllNodesAndLowerChanges() { | 57 void LowerAllNodesAndLowerChanges() { |
58 this->End(); | 58 this->End(); |
59 typer.Run(); | 59 typer.Run(); |
60 lowering.LowerAllNodes(); | 60 lowering.LowerAllNodes(); |
61 | 61 |
62 ChangeLowering lowering(&jsgraph); | 62 ChangeLowering lowering(&jsgraph); |
63 GraphReducer reducer(this->graph(), this->zone()); | 63 GraphReducer reducer(this->zone(), this->graph()); |
64 reducer.AddReducer(&lowering); | 64 reducer.AddReducer(&lowering); |
65 reducer.ReduceGraph(); | 65 reducer.ReduceGraph(); |
66 Verifier::Run(this->graph()); | 66 Verifier::Run(this->graph()); |
67 } | 67 } |
68 | 68 |
69 void CheckNumberCall(double expected, double input) { | 69 void CheckNumberCall(double expected, double input) { |
70 // TODO(titzer): make calls to NewNumber work in cctests. | 70 // TODO(titzer): make calls to NewNumber work in cctests. |
71 if (expected <= Smi::kMinValue) return; | 71 if (expected <= Smi::kMinValue) return; |
72 if (expected >= Smi::kMaxValue) return; | 72 if (expected >= Smi::kMaxValue) return; |
73 Handle<Object> num = factory()->NewNumber(input); | 73 Handle<Object> num = factory()->NewNumber(input); |
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); | 2086 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); |
2087 NodeProperties::SetBounds(phi, phi_bounds); | 2087 NodeProperties::SetBounds(phi, phi_bounds); |
2088 | 2088 |
2089 Node* use = t.Use(phi, d.use); | 2089 Node* use = t.Use(phi, d.use); |
2090 t.Return(use); | 2090 t.Return(use); |
2091 t.Lower(); | 2091 t.Lower(); |
2092 | 2092 |
2093 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); | 2093 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); |
2094 } | 2094 } |
2095 } | 2095 } |
OLD | NEW |