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/compiler/js-graph.h" | 5 #include "src/compiler/js-graph.h" |
6 #include "src/compiler/js-typed-lowering.h" | 6 #include "src/compiler/js-typed-lowering.h" |
7 #include "src/compiler/machine-operator.h" | 7 #include "src/compiler/machine-operator.h" |
8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
9 #include "src/compiler/opcodes.h" | 9 #include "src/compiler/opcodes.h" |
10 #include "src/compiler/operator-properties.h" | 10 #include "src/compiler/operator-properties.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 | 78 |
79 Node* state_node = graph.NewNode( | 79 Node* state_node = graph.NewNode( |
80 common.FrameState(BailoutId::None(), OutputFrameStateCombine::Ignore(), | 80 common.FrameState(BailoutId::None(), OutputFrameStateCombine::Ignore(), |
81 nullptr), | 81 nullptr), |
82 parameters, locals, stack, context, UndefinedConstant(), graph.start()); | 82 parameters, locals, stack, context, UndefinedConstant(), graph.start()); |
83 | 83 |
84 return state_node; | 84 return state_node; |
85 } | 85 } |
86 | 86 |
87 Node* reduce(Node* node) { | 87 Node* reduce(Node* node) { |
88 JSGraph jsgraph(main_isolate(), &graph, &common, &javascript, &machine); | 88 JSGraph jsgraph(main_isolate(), &graph, &common, &javascript, &simplified, |
| 89 &machine); |
89 // TODO(titzer): mock the GraphReducer here for better unit testing. | 90 // TODO(titzer): mock the GraphReducer here for better unit testing. |
90 GraphReducer graph_reducer(main_zone(), &graph); | 91 GraphReducer graph_reducer(main_zone(), &graph); |
91 JSTypedLowering reducer(&graph_reducer, &jsgraph, main_zone()); | 92 JSTypedLowering reducer(&graph_reducer, &jsgraph, main_zone()); |
92 Reduction reduction = reducer.Reduce(node); | 93 Reduction reduction = reducer.Reduce(node); |
93 if (reduction.Changed()) return reduction.replacement(); | 94 if (reduction.Changed()) return reduction.replacement(); |
94 return node; | 95 return node; |
95 } | 96 } |
96 | 97 |
97 Node* start() { return graph.start(); } | 98 Node* start() { return graph.start(); } |
98 | 99 |
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 CHECK_EQ(p1, r->InputAt(0)); | 1251 CHECK_EQ(p1, r->InputAt(0)); |
1251 CHECK_EQ(p0, r->InputAt(1)); | 1252 CHECK_EQ(p0, r->InputAt(1)); |
1252 } else { | 1253 } else { |
1253 CHECK_EQ(p0, r->InputAt(0)); | 1254 CHECK_EQ(p0, r->InputAt(0)); |
1254 CHECK_EQ(p1, r->InputAt(1)); | 1255 CHECK_EQ(p1, r->InputAt(1)); |
1255 } | 1256 } |
1256 } | 1257 } |
1257 } | 1258 } |
1258 } | 1259 } |
1259 } | 1260 } |
OLD | NEW |