Chromium Code Reviews| Index: runtime/vm/intermediate_language.cc |
| =================================================================== |
| --- runtime/vm/intermediate_language.cc (revision 37311) |
| +++ runtime/vm/intermediate_language.cc (working copy) |
| @@ -3087,7 +3087,7 @@ |
| case Token::kMUL: { |
| const int64_t left_max = ConstantAbsMax(left_range); |
|
Vyacheslav Egorov (Google)
2014/06/13 13:59:29
Can you test it for kMinInt64 * -1? Because I am b
Florian Schneider
2014/06/16 10:45:10
We're staying in smi range here: ConstantAbsMax re
|
| const int64_t right_max = ConstantAbsMax(right_range); |
| - if ((left_max < 0x7FFFFFFF) && (right_max < 0x7FFFFFFF)) { |
| + if ((left_max == 0) || (right_max <= kMaxInt64 / left_max)) { |
| // Product of left and right max values stays in 64 bit range. |
| const int64_t result_max = left_max * right_max; |
| if (Smi::IsValid64(result_max) && Smi::IsValid64(-result_max)) { |