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

Unified Diff: runtime/vm/flow_graph.cc

Issue 18558008: Prune variables that are not live at block entry from the environment. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph.cc
===================================================================
--- runtime/vm/flow_graph.cc (revision 24909)
+++ runtime/vm/flow_graph.cc (working copy)
@@ -750,6 +750,15 @@
}
}
+ // Prune non-live variables at block entry by replacing their environment
+ // slots with null.
+ BitVector* live_in = variable_liveness->GetLiveInSet(block_entry);
+ for (intptr_t i = 0; i < variable_count(); i++) {
+ if (!live_in->Contains(i)) {
+ (*env)[i] = constant_null();
+ }
+ }
+
// Attach environment to the block entry.
AttachEnvironment(block_entry, env);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698