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/ast/scopes.h" | 7 #include "src/ast/scopes.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/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 this->start(), this->start()); | 122 this->start(), this->start()); |
123 Node* end = this->graph()->NewNode(this->common()->End(1), ret); | 123 Node* end = this->graph()->NewNode(this->common()->End(1), ret); |
124 this->graph()->SetEnd(end); | 124 this->graph()->SetEnd(end); |
125 LowerChange(change); | 125 LowerChange(change); |
126 } | 126 } |
127 | 127 |
128 void LowerChange(Node* change) { | 128 void LowerChange(Node* change) { |
129 // Run the graph reducer with changes lowering on a single node. | 129 // Run the graph reducer with changes lowering on a single node. |
130 Typer typer(this->isolate(), this->graph()); | 130 Typer typer(this->isolate(), this->graph()); |
131 typer.Run(); | 131 typer.Run(); |
| 132 ChangeLowering change_lowering(&jsgraph); |
| 133 SelectLowering select_lowering(this->graph(), this->common()); |
132 GraphReducer reducer(this->zone(), this->graph()); | 134 GraphReducer reducer(this->zone(), this->graph()); |
133 ChangeLowering change_lowering(&reducer, &jsgraph); | |
134 SelectLowering select_lowering(this->graph(), this->common()); | |
135 reducer.AddReducer(&change_lowering); | 135 reducer.AddReducer(&change_lowering); |
136 reducer.AddReducer(&select_lowering); | 136 reducer.AddReducer(&select_lowering); |
137 reducer.ReduceNode(change); | 137 reducer.ReduceNode(change); |
138 Verifier::Run(this->graph(), Verifier::UNTYPED); | 138 Verifier::Run(this->graph(), Verifier::UNTYPED); |
139 } | 139 } |
140 | 140 |
141 Factory* factory() { return this->isolate()->factory(); } | 141 Factory* factory() { return this->isolate()->factory(); } |
142 Heap* heap() { return this->isolate()->heap(); } | 142 Heap* heap() { return this->isolate()->heap(); } |
143 }; | 143 }; |
144 | 144 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 { | 281 { |
282 Object* result = t.Call(0); | 282 Object* result = t.Call(0); |
283 Object* false_obj = t.heap()->false_value(); | 283 Object* false_obj = t.heap()->false_value(); |
284 CHECK_EQ(false_obj, result); | 284 CHECK_EQ(false_obj, result); |
285 } | 285 } |
286 } | 286 } |
287 | 287 |
288 } // namespace compiler | 288 } // namespace compiler |
289 } // namespace internal | 289 } // namespace internal |
290 } // namespace v8 | 290 } // namespace v8 |
OLD | NEW |