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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 690043002: Introduce --no-prune-dead-locals flag to disable dead locals pruning. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 7a800233acfb0e9099b434284e344994f9850cc6..44174e7a9f5c4992e8c6d5be50df863944504853 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -37,6 +37,7 @@ DECLARE_FLAG(bool, eliminate_type_checks);
DECLARE_FLAG(bool, trace_optimization);
DECLARE_FLAG(bool, trace_constant_propagation);
DECLARE_FLAG(bool, throw_on_javascript_int_overflow);
+DECLARE_FLAG(bool, prune_dead_locals);
Definition::Definition(intptr_t deopt_id)
: Instruction(deopt_id),
@@ -1067,7 +1068,11 @@ void JoinEntryInstr::InsertPhi(intptr_t var_index, intptr_t var_count) {
}
}
ASSERT((*phis_)[var_index] == NULL);
- (*phis_)[var_index] = new PhiInstr(this, PredecessorCount());
+ PhiInstr* phi = new PhiInstr(this, PredecessorCount());
+ (*phis_)[var_index] = phi;
+ if (!FLAG_prune_dead_locals) {
+ phi->mark_alive();
+ }
}
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698