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

Unified Diff: runtime/vm/flow_graph_type_propagator.h

Issue 12317013: Strengthen type assertions post-dominated by checks during type propagation. (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
Index: runtime/vm/flow_graph_type_propagator.h
diff --git a/runtime/vm/flow_graph_type_propagator.h b/runtime/vm/flow_graph_type_propagator.h
index fafd1b62f26db032a27a5ad8b23f88ae0aa49720..f01dc5f2dd6af2a3e3dcdb9cddf85792749c8602 100644
--- a/runtime/vm/flow_graph_type_propagator.h
+++ b/runtime/vm/flow_graph_type_propagator.h
@@ -38,6 +38,10 @@ class FlowGraphTypePropagator : public FlowGraphVisitor {
void AddToWorklist(Definition* defn);
Definition* RemoveLastFromWorklist();
+ // Type assertion strengthening.
+ void StrengthenAsserts(BlockEntryInstr* block);
+ void StrengthenAssertWith(Instruction* check);
+
FlowGraph* flow_graph_;
// Mapping between SSA values and their current reaching types. Valid
@@ -48,6 +52,9 @@ class FlowGraphTypePropagator : public FlowGraphVisitor {
GrowableArray<Definition*> worklist_;
BitVector* in_worklist_;
+ ZoneGrowableArray<AssertAssignableInstr*>* asserts_;
+ ZoneGrowableArray<intptr_t>* collected_asserts_;
+
// RollbackEntry is used to track and rollback changed in the types_ array
// done during dominator tree traversal.
class RollbackEntry {

Powered by Google App Engine
This is Rietveld 408576698