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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 12260008: Reapply r18377 it was reverted due to the unrelated bug it surfaced. (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_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index 236c4d9dd7ea7069257f6131573bb0871530638f..ce2e218b5d125153590e02a7581e165dcb211f26 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -762,12 +762,7 @@ bool EffectGraphVisitor::CanSkipTypeCheck(intptr_t token_pos,
return false;
}
- // Propagated types are not set yet.
- // More checks will possibly be eliminated during type propagation.
- bool is_null, is_instance;
- const bool eliminated =
- (value->CanComputeIsNull(&is_null) && is_null) ||
- (value->CanComputeIsInstanceOf(dst_type, &is_instance) && is_instance);
+ const bool eliminated = value->Type()->IsAssignableTo(dst_type);
if (FLAG_trace_type_check_elimination) {
FlowGraphPrinter::PrintTypeCheck(owner()->parsed_function(),
token_pos,

Powered by Google App Engine
This is Rietveld 408576698