Index: runtime/vm/constant_propagator.cc |
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc |
index a1abaaded7d9d3a7295b80d34bc65707ad2cf8ff..551b41e2e0a10b49e464788258ef64efcbe6c887 100644 |
--- a/runtime/vm/constant_propagator.cc |
+++ b/runtime/vm/constant_propagator.cc |
@@ -508,13 +508,17 @@ static bool CompareIntegers(Token::Kind kind, |
} |
+// Comparison instruction that is equivalent to the (left & right) == 0 |
+// comparison pattern. |
void ConstantPropagator::VisitTestSmi(TestSmiInstr* instr) { |
const Object& left = instr->left()->definition()->constant_value(); |
const Object& right = instr->right()->definition()->constant_value(); |
if (IsNonConstant(left) || IsNonConstant(right)) { |
SetValue(instr, non_constant_); |
} else if (IsConstant(left) && IsConstant(right)) { |
- if (left.IsInteger() && right.IsInteger()) { |
+ // BitOp does not work on Bigints. |
+ if ((left.IsInteger() && right.IsInteger()) && |
regis
2015/06/22 21:57:18
Parenthesis around (left.IsInteger() && right.IsIn
srdjan
2015/06/22 22:00:41
Done.
|
+ !left.IsBigint() && !right.IsBigint()) { |
const bool result = CompareIntegers( |
instr->kind(), |
Integer::Handle(I, Integer::Cast(left).BitOp(Token::kBIT_AND, |