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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 13125002: Fix checked mode crash when clearing reaching type of a value. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 20676)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -38,13 +38,15 @@
+// Optimize instance calls using ICData.
void FlowGraphOptimizer::ApplyICData() {
VisitBlocks();
}
+// Optimize instance calls using cid.
// Attempts to convert an instance call (IC call) using propagated class-ids,
-// e.g., receiver class id.
+// e.g., receiver class id, guarded-cid.
void FlowGraphOptimizer::ApplyClassIds() {
ASSERT(current_iterator_ == NULL);
for (intptr_t i = 0; i < block_order_.length(); ++i) {
@@ -1205,6 +1207,13 @@
// can't deoptimize.
call->RemoveEnvironment();
ReplaceCall(call, load);
+
+ if (load->result_cid() != kDynamicCid) {
+ // Reset value types if guarded_cid was used.
+ for (Value::Iterator it(load->input_use_list()); !it.Done(); it.Advance()) {
+ it.Current()->SetReachingType(NULL);
+ }
+ }
}
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698