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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 21272003: Fix crash bug in the polymorphic inlining. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed one more corner case 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 | tests/language/allocation_sinking_inlining_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_inliner.cc
===================================================================
--- runtime/vm/flow_graph_inliner.cc (revision 25662)
+++ runtime/vm/flow_graph_inliner.cc (working copy)
@@ -1180,6 +1180,10 @@
callee_entry->AsGraphEntry()->normal_entry();
cursor->LinkTo(target->next());
target->ReplaceAsPredecessorWith(current_block);
+ // Unuse all inputs of the graph entry and the normal entry. They are
+ // not in the graph anymore.
+ callee_entry->UnuseAllInputs();
+ target->UnuseAllInputs();
// All blocks that were dominated by the normal entry are now
// dominated by the current block.
for (intptr_t j = 0;
@@ -1230,6 +1234,8 @@
if (callee_entry->IsGraphEntry()) {
// Unshared.
true_target = callee_entry->AsGraphEntry()->normal_entry();
+ // Unuse all inputs of the graph entry. It is not in the graph anymore.
+ callee_entry->UnuseAllInputs();
} else if (callee_entry->IsTargetEntry()) {
// Shared inlined body and this is the first entry. We have already
// constructed a join and this target jumps to it.
« no previous file with comments | « no previous file | tests/language/allocation_sinking_inlining_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698