OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/code_patcher.h" | 10 #include "vm/code_patcher.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 FlowGraphPrinter printer(*flow_graph); | 172 FlowGraphPrinter printer(*flow_graph); |
173 printer.PrintBlocks(); | 173 printer.PrintBlocks(); |
174 } | 174 } |
175 if (Dart::flow_graph_writer() != NULL) { | 175 if (Dart::flow_graph_writer() != NULL) { |
176 // Write flow graph to file. | 176 // Write flow graph to file. |
177 FlowGraphVisualizer printer(*flow_graph); | 177 FlowGraphVisualizer printer(*flow_graph); |
178 printer.PrintFunction(); | 178 printer.PrintFunction(); |
179 } | 179 } |
180 | 180 |
181 if (optimized) { | 181 if (optimized) { |
182 FlowGraphOptimizer optimizer(*flow_graph); | 182 FlowGraphOptimizer optimizer(flow_graph); |
183 optimizer.ApplyICData(); | 183 optimizer.ApplyICData(); |
184 | 184 |
185 // Propagate types and eliminate more type tests. | 185 // Propagate types and eliminate more type tests. |
186 FlowGraphTypePropagator propagator(*flow_graph); | 186 FlowGraphTypePropagator propagator(*flow_graph); |
187 propagator.PropagateTypes(); | 187 propagator.PropagateTypes(); |
188 | 188 |
189 // Do optimizations that depend on the propagated type information. | 189 // Do optimizations that depend on the propagated type information. |
190 optimizer.OptimizeComputations(); | 190 optimizer.OptimizeComputations(); |
191 | 191 |
192 if (FLAG_local_cse) { | 192 if (FLAG_local_cse) { |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 result = isolate->object_store()->sticky_error(); | 551 result = isolate->object_store()->sticky_error(); |
552 isolate->object_store()->clear_sticky_error(); | 552 isolate->object_store()->clear_sticky_error(); |
553 isolate->set_long_jump_base(base); | 553 isolate->set_long_jump_base(base); |
554 return result.raw(); | 554 return result.raw(); |
555 } | 555 } |
556 UNREACHABLE(); | 556 UNREACHABLE(); |
557 return Object::null(); | 557 return Object::null(); |
558 } | 558 } |
559 | 559 |
560 } // namespace dart | 560 } // namespace dart |
OLD | NEW |