| Index: test/mjsunit/regress/regress-3039.js
|
| diff --git a/test/mjsunit/regress/regress-2132.js b/test/mjsunit/regress/regress-3039.js
|
| similarity index 84%
|
| copy from test/mjsunit/regress/regress-2132.js
|
| copy to test/mjsunit/regress/regress-3039.js
|
| index 9eb2dc5b073e6e3c2ce46362903d07d727de3d27..3c7f62c16e65872c786c04e5af00cfdd5f27a8ed 100644
|
| --- a/test/mjsunit/regress/regress-2132.js
|
| +++ b/test/mjsunit/regress/regress-3039.js
|
| @@ -27,22 +27,15 @@
|
|
|
| // Flags: --allow-natives-syntax
|
|
|
| -function mul(x, y) {
|
| - return (x * y) | 0;
|
| -}
|
| -
|
| -mul(0, 0);
|
| -mul(0, 0);
|
| -%OptimizeFunctionOnNextCall(mul);
|
| -assertEquals(0, mul(0, -1));
|
| -assertOptimized(mul);
|
| -
|
| -function div(x, y) {
|
| +function do_div(x, y) {
|
| return (x / y) | 0;
|
| }
|
|
|
| -div(4, 2);
|
| -div(4, 2);
|
| -%OptimizeFunctionOnNextCall(div);
|
| -assertEquals(1, div(5, 3));
|
| -assertOptimized(div);
|
| +// Preparation.
|
| +assertEquals(17, do_div(51, 3));
|
| +assertEquals(13, do_div(65, 5));
|
| +%OptimizeFunctionOnNextCall(do_div);
|
| +assertEquals(11, do_div(77, 7));
|
| +
|
| +// The actual test. We should not trigger a floating point exception.
|
| +assertEquals(-2147483648, do_div(-2147483648, -1));
|
|
|