| Index: test/mjsunit/elide-double-hole-check-3.js
|
| diff --git a/test/mjsunit/regress/regress-2451.js b/test/mjsunit/elide-double-hole-check-3.js
|
| similarity index 88%
|
| copy from test/mjsunit/regress/regress-2451.js
|
| copy to test/mjsunit/elide-double-hole-check-3.js
|
| index 465e4e68c26f3e3e119cbaf82d50c8f83c6efa9a..f8179403ec0db288dca74a4a889fd0771372c7b1 100644
|
| --- a/test/mjsunit/regress/regress-2451.js
|
| +++ b/test/mjsunit/elide-double-hole-check-3.js
|
| @@ -27,15 +27,13 @@
|
|
|
| // Flags: --allow-natives-syntax
|
|
|
| -function f() {
|
| - assertEquals(-1.0, Math.round(-1.5));
|
| - assertEquals(-2.0, Math.round(-2.5));
|
| - assertEquals(-1.0, Math.round(-0.5000000000000001));
|
| +function f(a, i) {
|
| + return a[i] + 0.5;
|
| }
|
| -
|
| -f();
|
| -f();
|
| +Array.prototype = [1.5,1.5,1.5];
|
| +var arr = [0.0,,];
|
| +assertEquals(0.5, f(arr, 0));
|
| +assertEquals(0.5, f(arr, 0));
|
| %OptimizeFunctionOnNextCall(f);
|
| -f();
|
| -assertTrue(%GetOptimizationStatus(f) != 2);
|
| -
|
| +assertEquals(0.5, f(arr, 0));
|
| +assertEquals(NaN, f(arr, 1));
|
|
|