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

Unified Diff: runtime/vm/constant_propagator.cc

Issue 2751543003: VM: Simplify lowering of is-tests. (Closed)
Patch Set: fix dbc build 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 | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/constants_dbc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/constant_propagator.cc
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index 9d2bc110cd2248641c859880cdb5f7b90d4f253d..f3827b0ee97043226e98e417ad52aa088f71ceb5 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -755,7 +755,7 @@ void ConstantPropagator::VisitInstanceOf(InstanceOfInstr* instr) {
((rep == kUnboxedDouble) && (value_cid == kDoubleCid)) ||
((rep == kUnboxedMint) && (value_cid == kMintCid)));
// The representation guarantees the type check to be true.
- SetValue(instr, instr->negate_result() ? Bool::False() : Bool::True());
+ SetValue(instr, Bool::True());
} else {
SetValue(instr, non_constant_);
}
@@ -770,8 +770,7 @@ void ConstantPropagator::VisitInstanceOf(InstanceOfInstr* instr) {
checked_type, checked_type_arguments, &bound_error);
// Can only have bound error with generics.
ASSERT(bound_error.IsNull());
- SetValue(instr, Bool::Get(instr->negate_result() ? !is_instance
- : is_instance));
+ SetValue(instr, Bool::Get(is_instance));
return;
}
}
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/constants_dbc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698