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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 16566003: Small fix and cleanups. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/bit_vector.cc ('k') | no next file » | 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 23692)
+++ runtime/vm/flow_graph_type_propagator.cc (working copy)
@@ -14,6 +14,7 @@
"Trace flow graph type propagation");
DECLARE_FLAG(bool, enable_type_checks);
+DECLARE_FLAG(bool, propagate_types);
DECLARE_FLAG(bool, use_cha);
@@ -489,9 +490,11 @@
intptr_t CompileType::ToNullableCid() {
if (cid_ == kIllegalCid) {
- ASSERT(type_ != NULL);
-
- if (type_->IsMalformed()) {
+ if (type_ == NULL) {
+ // Type propagation is turned off.
+ ASSERT(!FLAG_propagate_types);
+ return kDynamicCid;
+ } else if (type_->IsMalformed()) {
cid_ = kDynamicCid;
} else if (type_->IsVoidType()) {
cid_ = kNullCid;
« no previous file with comments | « runtime/vm/bit_vector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698