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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 22335005: Fix Issue 12322: the analysis requires stored guarded_cid to be returned when requested; only when … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_type_propagator.cc
===================================================================
--- runtime/vm/flow_graph_type_propagator.cc (revision 25934)
+++ runtime/vm/flow_graph_type_propagator.cc (working copy)
@@ -952,9 +952,13 @@
}
if ((field_ != NULL) && (field_->guarded_cid() != kIllegalCid)) {
- ASSERT(!Field::IsExternalizableCid(field_->guarded_cid()));
- return CompileType::CreateNullable(field_->is_nullable(),
- field_->guarded_cid());
+ intptr_t field_cid = field_->guarded_cid();
+ if (Field::IsExternalizableCid(field_cid)) {
+ // We cannot assume that the type of the value in the field has not
+ // changed on the fly.
+ field_cid = kDynamicCid;
+ }
+ return CompileType::CreateNullable(field_->is_nullable(), field_cid);
}
ASSERT(!Field::IsExternalizableCid(result_cid_));
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698