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

Unified Diff: runtime/vm/flow_graph.cc

Issue 27339003: When a value has been optimized away by the compiler, set its value to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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.h ('k') | runtime/vm/symbols.h » ('j') | 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 28666)
+++ runtime/vm/flow_graph.cc (working copy)
@@ -34,6 +34,8 @@
postorder_(),
reverse_postorder_(),
optimized_block_order_(),
+ constant_null_(NULL),
+ constant_dead_(NULL),
block_effects_(NULL),
licm_allowed_(true),
use_far_branches_(false),
@@ -706,6 +708,7 @@
// Add global constants to the initial definitions.
constant_null_ = GetConstant(Object::ZoneHandle());
+ constant_dead_ = GetConstant(Symbols::OptimizedOut());
// Add parameters to the initial definitions and renaming environment.
if (inlining_parameters != NULL) {
@@ -804,7 +807,7 @@
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();
+ (*env)[i] = constant_dead();
}
}
@@ -875,7 +878,7 @@
if (variable_liveness->IsStoreAlive(block_entry, store)) {
(*env)[index] = result;
} else {
- (*env)[index] = constant_null();
+ (*env)[index] = constant_dead();
}
} else if (load != NULL) {
// The graph construction ensures we do not have an unused LoadLocal
@@ -891,7 +894,7 @@
}
if (variable_liveness->IsLastLoad(block_entry, load)) {
- (*env)[index] = constant_null();
+ (*env)[index] = constant_dead();
}
} else if (push != NULL) {
result = push->value()->definition();
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698