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

Unified Diff: runtime/vm/flow_graph_allocator.cc

Issue 12315017: Ignore definitions without uses in FlowGraphAllocator::CollectRepresentations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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_allocator.cc
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index 4adf6818eacdb2cb23837d424a96959e96c27dc9..a2b0c3688c2f557017caaa5a08384a91ccec597a 100644
--- a/runtime/vm/flow_graph_allocator.cc
+++ b/runtime/vm/flow_graph_allocator.cc
@@ -2432,9 +2432,11 @@ void FlowGraphAllocator::CollectRepresentations() {
for (ForwardInstructionIterator instr_it(block);
!instr_it.Done();
instr_it.Advance()) {
- Instruction* instr = instr_it.Current();
- if (instr->IsDefinition() && instr->representation() == kUnboxedMint) {
- mint_values_->Add(instr->AsDefinition()->ssa_temp_index());
+ Definition* defn = instr_it.Current()->AsDefinition();
+ if ((defn != NULL) &&
+ (defn->ssa_temp_index() >= 0) &&
+ (defn->representation() == kUnboxedMint)) {
+ mint_values_->Add(defn->ssa_temp_index());
}
}
}
« 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