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

Unified Diff: vm/flow_graph_builder.cc

Issue 10692072: Fix a bug in SSA renaming introduced when using the RemoveFromGraph helper for removing instruction… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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
« no previous file with comments | « no previous file | vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/flow_graph_builder.cc
===================================================================
--- vm/flow_graph_builder.cc (revision 9330)
+++ vm/flow_graph_builder.cc (working copy)
@@ -2727,16 +2727,18 @@
if (load != NULL) {
// Remove instruction.
- current->RemoveFromGraph();
+ current = current->RemoveFromGraph();
} else if (store != NULL) {
// Remove instruction and update renaming environment.
- current->RemoveFromGraph();
+ current = current->RemoveFromGraph();
(*env)[store->local().BitIndexIn(var_count)] = store->value();
- } else if (current->IsBind()) {
- // Assign new SSA temporary.
- current->AsDefinition()->set_ssa_temp_index(current_ssa_temp_index_++);
+ } else {
+ if (current->IsBind()) {
+ // Assign new SSA temporary.
+ current->AsDefinition()->set_ssa_temp_index(current_ssa_temp_index_++);
+ }
+ current = current->successor();
}
- current = current->successor();
}
// 3. Process dominated blocks.
« no previous file with comments | « no previous file | vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698