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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 2764753008: Revert "VM: Handle null-comparisons in the flow graph type propagation" (Closed)
Patch Set: Created 3 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_type_propagator.cc
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index e5c1ce70f9eac6144d0f602bda3fdc6a4a8bfcfe..d6a3808302d7559c96518c1a32671ed0f61ed5ab 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -350,7 +350,7 @@ void FlowGraphTypePropagator::VisitBranch(BranchInstr* instr) {
} else if ((call != NULL) &&
call->MatchesCoreName(Symbols::_simpleInstanceOf()) &&
comparison->InputAt(1)->BindsToConstant() &&
- comparison->InputAt(1)->BoundConstant().IsBool()) {
+ (comparison->InputAt(1)->BoundConstant().IsBool())) {
ASSERT(call->ArgumentAt(1)->IsConstant());
if (comparison->InputAt(1)->BoundConstant().raw() == Bool::False().raw()) {
negated = !negated;
@@ -367,24 +367,8 @@ void FlowGraphTypePropagator::VisitBranch(BranchInstr* instr) {
true_successor, call->ArgumentAt(0),
CompileType::FromAbstractType(Type::Cast(type), is_nullable));
}
- } else if (comparison->InputAt(0)->BindsToConstant() &&
- comparison->InputAt(0)->BoundConstant().IsNull()) {
- // Handle for expr != null.
- BlockEntryInstr* true_successor =
- negated ? instr->true_successor() : instr->false_successor();
- redef = flow_graph_->EnsureRedefinition(
- true_successor, comparison->InputAt(1)->definition(),
- comparison->InputAt(1)->Type()->CopyNonNullable());
-
- } else if (comparison->InputAt(1)->BindsToConstant() &&
- comparison->InputAt(1)->BoundConstant().IsNull()) {
- // Handle for null != expr.
- BlockEntryInstr* true_successor =
- negated ? instr->true_successor() : instr->false_successor();
- redef = flow_graph_->EnsureRedefinition(
- true_successor, comparison->InputAt(0)->definition(),
- comparison->InputAt(0)->Type()->CopyNonNullable());
}
+ // TODO(fschneider): Add propagation for null-comparisons.
// TODO(fschneider): Add propagation for generic is-tests.
// Grow types array if a new redefinition was inserted.
« 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