Index: runtime/vm/intermediate_language.cc |
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc |
index fb55f660f397e597849ddd6bd71d4f0e290e08bf..cc17570f555e362f5e4bf34f2098477e93f7939e 100644 |
--- a/runtime/vm/intermediate_language.cc |
+++ b/runtime/vm/intermediate_language.cc |
@@ -1656,7 +1656,7 @@ RawInteger* BinaryIntegerOpInstr::Evaluate(const Integer& left, |
case Token::kTRUNCDIV: |
case Token::kMOD: |
// Check right value for zero. |
- if (right.AsInt64Value() == 0) { |
+ if (right.IsSmi() && right.AsInt64Value() == 0) { |
break; // Will throw. |
} |
// Fall through. |