| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/flow_graph_allocator.h" | 5 #include "vm/flow_graph_allocator.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 #include "vm/il_printer.h" | 9 #include "vm/il_printer.h" |
| 10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 | 609 |
| 610 if (block->IsJoinEntry()) { | 610 if (block->IsJoinEntry()) { |
| 611 ConnectIncomingPhiMoves(block->AsJoinEntry()); | 611 ConnectIncomingPhiMoves(block->AsJoinEntry()); |
| 612 } else if (block->IsCatchBlockEntry()) { | 612 } else if (block->IsCatchBlockEntry()) { |
| 613 // Process initial definitions. | 613 // Process initial definitions. |
| 614 CatchBlockEntryInstr* catch_entry = block->AsCatchBlockEntry(); | 614 CatchBlockEntryInstr* catch_entry = block->AsCatchBlockEntry(); |
| 615 #if defined(TARGET_ARCH_DBC) | 615 #if defined(TARGET_ARCH_DBC) |
| 616 // TODO(vegorov) support try-catch/finally for DBC. | 616 // TODO(vegorov) support try-catch/finally for DBC. |
| 617 flow_graph_.parsed_function().Bailout("FlowGraphAllocator", "Catch"); | 617 flow_graph_.parsed_function().Bailout("FlowGraphAllocator", "Catch"); |
| 618 #endif | 618 #endif |
| 619 |
| 620 ProcessEnvironmentUses(catch_entry, catch_entry); // For lazy deopt |
| 621 |
| 619 for (intptr_t i = 0; | 622 for (intptr_t i = 0; |
| 620 i < catch_entry->initial_definitions()->length(); | 623 i < catch_entry->initial_definitions()->length(); |
| 621 i++) { | 624 i++) { |
| 622 Definition* defn = (*catch_entry->initial_definitions())[i]; | 625 Definition* defn = (*catch_entry->initial_definitions())[i]; |
| 623 LiveRange* range = GetLiveRange(defn->ssa_temp_index()); | 626 LiveRange* range = GetLiveRange(defn->ssa_temp_index()); |
| 624 range->DefineAt(catch_entry->start_pos()); // Defined at block entry. | 627 range->DefineAt(catch_entry->start_pos()); // Defined at block entry. |
| 625 ProcessInitialDefinition(defn, range, catch_entry); | 628 ProcessInitialDefinition(defn, range, catch_entry); |
| 626 } | 629 } |
| 627 // Block the two fixed registers used by CatchBlockEntryInstr from the | 630 // Block the two fixed registers used by CatchBlockEntryInstr from the |
| 628 // block start to until the end of the instruction so that they are | 631 // block start to until the end of the instruction so that they are |
| (...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3110 FlowGraphPrinter printer(flow_graph_, true); | 3113 FlowGraphPrinter printer(flow_graph_, true); |
| 3111 printer.PrintBlocks(); | 3114 printer.PrintBlocks(); |
| 3112 #endif | 3115 #endif |
| 3113 } | 3116 } |
| 3114 THR_Print("----------------------------------------------\n"); | 3117 THR_Print("----------------------------------------------\n"); |
| 3115 } | 3118 } |
| 3116 } | 3119 } |
| 3117 | 3120 |
| 3118 | 3121 |
| 3119 } // namespace dart | 3122 } // namespace dart |
| OLD | NEW |