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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 22590002: Fix bug with optimized try-catch on ARM/MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: added cleanup of CatchEntry Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 25871)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -3631,15 +3631,14 @@
for (intptr_t catch_idx = 0;
catch_idx < catch_entries.length();
++catch_idx) {
- CatchBlockEntryInstr* cb = catch_entries[catch_idx];
- CatchEntryInstr* catch_entry = cb->next()->AsCatchEntry();
+ CatchBlockEntryInstr* catch_entry = catch_entries[catch_idx];
// Initialize cdefs with the original initial definitions (ParameterInstr).
// The following representation is used:
// ParameterInstr => unknown
// ConstantInstr => known constant
// NULL => non-constant
- GrowableArray<Definition*>* idefs = cb->initial_definitions();
+ GrowableArray<Definition*>* idefs = catch_entry->initial_definitions();
GrowableArray<Definition*> cdefs(idefs->length());
cdefs.AddArray(*idefs);
@@ -3652,7 +3651,7 @@
!block_it.Done();
block_it.Advance()) {
BlockEntryInstr* block = block_it.Current();
- if (block->try_index() == cb->catch_try_index()) {
+ if (block->try_index() == catch_entry->catch_try_index()) {
for (ForwardInstructionIterator instr_it(block);
!instr_it.Done();
instr_it.Advance()) {
@@ -5726,9 +5725,6 @@
void ConstantPropagator::VisitStoreContext(StoreContextInstr* instr) { }
-void ConstantPropagator::VisitCatchEntry(CatchEntryInstr* instr) { }
-
-
void ConstantPropagator::VisitCheckStackOverflow(
CheckStackOverflowInstr* instr) { }

Powered by Google App Engine
This is Rietveld 408576698