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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 this->End(); | 54 this->End(); |
55 typer.Run(); | 55 typer.Run(); |
56 lowering.LowerAllNodes(); | 56 lowering.LowerAllNodes(); |
57 } | 57 } |
58 | 58 |
59 void LowerAllNodesAndLowerChanges() { | 59 void LowerAllNodesAndLowerChanges() { |
60 this->End(); | 60 this->End(); |
61 typer.Run(); | 61 typer.Run(); |
62 lowering.LowerAllNodes(); | 62 lowering.LowerAllNodes(); |
63 | 63 |
64 Zone* zone = this->zone(); | 64 ChangeLowering lowering(&jsgraph); |
65 CompilationInfo info(this->isolate(), zone); | |
66 Linkage linkage(this->isolate(), zone, Linkage::GetSimplifiedCDescriptor( | |
67 zone, this->machine_sig_)); | |
68 ChangeLowering lowering(&jsgraph, &linkage); | |
69 GraphReducer reducer(this->graph(), this->zone()); | 65 GraphReducer reducer(this->graph(), this->zone()); |
70 reducer.AddReducer(&lowering); | 66 reducer.AddReducer(&lowering); |
71 reducer.ReduceGraph(); | 67 reducer.ReduceGraph(); |
72 Verifier::Run(this->graph()); | 68 Verifier::Run(this->graph()); |
73 } | 69 } |
74 | 70 |
75 void CheckNumberCall(double expected, double input) { | 71 void CheckNumberCall(double expected, double input) { |
76 // TODO(titzer): make calls to NewNumber work in cctests. | 72 // TODO(titzer): make calls to NewNumber work in cctests. |
77 if (expected <= Smi::kMinValue) return; | 73 if (expected <= Smi::kMinValue) return; |
78 if (expected >= Smi::kMaxValue) return; | 74 if (expected >= Smi::kMaxValue) return; |
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2044 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); | 2040 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); |
2045 NodeProperties::SetBounds(phi, phi_bounds); | 2041 NodeProperties::SetBounds(phi, phi_bounds); |
2046 | 2042 |
2047 Node* use = t.Use(phi, d.use); | 2043 Node* use = t.Use(phi, d.use); |
2048 t.Return(use); | 2044 t.Return(use); |
2049 t.Lower(); | 2045 t.Lower(); |
2050 | 2046 |
2051 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); | 2047 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); |
2052 } | 2048 } |
2053 } | 2049 } |
OLD | NEW |