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/change-lowering.h" | 7 #include "src/compiler/change-lowering.h" |
8 #include "src/compiler/control-builders.h" | 8 #include "src/compiler/control-builders.h" |
9 #include "src/compiler/generic-node-inl.h" | 9 #include "src/compiler/generic-node-inl.h" |
10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
11 #include "src/compiler/node-properties-inl.h" | 11 #include "src/compiler/node-properties-inl.h" |
12 #include "src/compiler/pipeline.h" | 12 #include "src/compiler/pipeline.h" |
| 13 #include "src/compiler/select-lowering.h" |
13 #include "src/compiler/simplified-lowering.h" | 14 #include "src/compiler/simplified-lowering.h" |
14 #include "src/compiler/verifier.h" | 15 #include "src/compiler/verifier.h" |
15 #include "src/execution.h" | 16 #include "src/execution.h" |
16 #include "src/globals.h" | 17 #include "src/globals.h" |
17 #include "src/parser.h" | 18 #include "src/parser.h" |
18 #include "src/rewriter.h" | 19 #include "src/rewriter.h" |
19 #include "src/scopes.h" | 20 #include "src/scopes.h" |
20 #include "test/cctest/cctest.h" | 21 #include "test/cctest/cctest.h" |
21 #include "test/cctest/compiler/codegen-tester.h" | 22 #include "test/cctest/compiler/codegen-tester.h" |
22 #include "test/cctest/compiler/function-tester.h" | 23 #include "test/cctest/compiler/function-tester.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 this->start(), this->start()); | 120 this->start(), this->start()); |
120 Node* end = this->graph()->NewNode(this->common()->End(), ret); | 121 Node* end = this->graph()->NewNode(this->common()->End(), ret); |
121 this->graph()->SetEnd(end); | 122 this->graph()->SetEnd(end); |
122 LowerChange(change); | 123 LowerChange(change); |
123 } | 124 } |
124 | 125 |
125 void LowerChange(Node* change) { | 126 void LowerChange(Node* change) { |
126 // Run the graph reducer with changes lowering on a single node. | 127 // Run the graph reducer with changes lowering on a single node. |
127 CompilationInfo info(this->isolate(), this->zone()); | 128 CompilationInfo info(this->isolate(), this->zone()); |
128 Linkage linkage(this->zone(), &info); | 129 Linkage linkage(this->zone(), &info); |
129 ChangeLowering lowering(&jsgraph, &linkage); | 130 ChangeLowering change_lowering(&jsgraph, &linkage); |
| 131 SelectLowering select_lowering(this->graph(), this->common()); |
130 GraphReducer reducer(this->graph()); | 132 GraphReducer reducer(this->graph()); |
131 reducer.AddReducer(&lowering); | 133 reducer.AddReducer(&change_lowering); |
| 134 reducer.AddReducer(&select_lowering); |
132 reducer.ReduceNode(change); | 135 reducer.ReduceNode(change); |
133 Verifier::Run(this->graph(), Verifier::UNTYPED); | 136 Verifier::Run(this->graph(), Verifier::UNTYPED); |
134 } | 137 } |
135 | 138 |
136 Factory* factory() { return this->isolate()->factory(); } | 139 Factory* factory() { return this->isolate()->factory(); } |
137 Heap* heap() { return this->isolate()->heap(); } | 140 Heap* heap() { return this->isolate()->heap(); } |
138 }; | 141 }; |
139 | 142 |
140 | 143 |
141 TEST(RunChangeTaggedToInt32) { | 144 TEST(RunChangeTaggedToInt32) { |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 | 386 |
384 input = *i; | 387 input = *i; |
385 Object* result = t.CallWithPotentialGC<Object>(); | 388 Object* result = t.CallWithPotentialGC<Object>(); |
386 t.CheckNumber(input, result); | 389 t.CheckNumber(input, result); |
387 } | 390 } |
388 } | 391 } |
389 } | 392 } |
390 } | 393 } |
391 | 394 |
392 #endif // V8_TURBOFAN_BACKEND | 395 #endif // V8_TURBOFAN_BACKEND |
OLD | NEW |