Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: runtime/vm/flow_graph_allocator.cc

Issue 2357343003: Fix lazy deoptimization in the presence of exceptions (Closed)
Patch Set: Ensure space for patching on ARM/MIPS archs Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698