| 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 | 8 |
| 9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
| 10 #include "vm/code_generator.h" | 10 #include "vm/code_generator.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 288 |
| 289 // The final canonicalization pass before the code generation. | 289 // The final canonicalization pass before the code generation. |
| 290 if (FLAG_propagate_types) { | 290 if (FLAG_propagate_types) { |
| 291 // Recompute types after code movement was done to ensure correct | 291 // Recompute types after code movement was done to ensure correct |
| 292 // reaching types for hoisted values. | 292 // reaching types for hoisted values. |
| 293 FlowGraphTypePropagator propagator(flow_graph); | 293 FlowGraphTypePropagator propagator(flow_graph); |
| 294 propagator.Propagate(); | 294 propagator.Propagate(); |
| 295 DEBUG_ASSERT(flow_graph->VerifyUseLists()); | 295 DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
| 296 } | 296 } |
| 297 | 297 |
| 298 // Optimize try-blocks. |
| 299 TryCatchAnalyzer::Optimize(flow_graph); |
| 300 |
| 298 // Detach environments from the instructions that can't deoptimize. | 301 // Detach environments from the instructions that can't deoptimize. |
| 299 // Do it before we attempt to perform allocation sinking to minimize | 302 // Do it before we attempt to perform allocation sinking to minimize |
| 300 // amount of materializations it has to perform. | 303 // amount of materializations it has to perform. |
| 301 optimizer.EliminateEnvironments(); | 304 optimizer.EliminateEnvironments(); |
| 302 | 305 |
| 303 // Attempt to sink allocations of temporary non-escaping objects to | 306 // Attempt to sink allocations of temporary non-escaping objects to |
| 304 // the deoptimization path. | 307 // the deoptimization path. |
| 305 AllocationSinking* sinking = NULL; | 308 AllocationSinking* sinking = NULL; |
| 306 if (FLAG_allocation_sinking) { | 309 if (FLAG_allocation_sinking) { |
| 307 sinking = new AllocationSinking(flow_graph); | 310 sinking = new AllocationSinking(flow_graph); |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 Object::Handle(isolate->object_store()->sticky_error()); | 736 Object::Handle(isolate->object_store()->sticky_error()); |
| 734 isolate->object_store()->clear_sticky_error(); | 737 isolate->object_store()->clear_sticky_error(); |
| 735 isolate->set_long_jump_base(base); | 738 isolate->set_long_jump_base(base); |
| 736 return result.raw(); | 739 return result.raw(); |
| 737 } | 740 } |
| 738 UNREACHABLE(); | 741 UNREACHABLE(); |
| 739 return Object::null(); | 742 return Object::null(); |
| 740 } | 743 } |
| 741 | 744 |
| 742 } // namespace dart | 745 } // namespace dart |
| OLD | NEW |