| Index: test/mjsunit/elide-double-hole-check-4.js
|
| diff --git a/test/mjsunit/regress/regress-2451.js b/test/mjsunit/elide-double-hole-check-4.js
|
| similarity index 87%
|
| copy from test/mjsunit/regress/regress-2451.js
|
| copy to test/mjsunit/elide-double-hole-check-4.js
|
| index 465e4e68c26f3e3e119cbaf82d50c8f83c6efa9a..e2a55055710d6aa222ca4c4aecfbe3926d9c5cca 100644
|
| --- a/test/mjsunit/regress/regress-2451.js
|
| +++ b/test/mjsunit/elide-double-hole-check-4.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 f1(a, i) {
|
| + return a[i] + 0.5;
|
| }
|
| -
|
| -f();
|
| -f();
|
| -%OptimizeFunctionOnNextCall(f);
|
| -f();
|
| -assertTrue(%GetOptimizationStatus(f) != 2);
|
| -
|
| +var arr = [0.0,,2.5];
|
| +assertEquals(0.5, f1(arr, 0));
|
| +assertEquals(0.5, f1(arr, 0));
|
| +%OptimizeFunctionOnNextCall(f1);
|
| +assertEquals(0.5, f1(arr, 0));
|
| +Array.prototype[1] = 1.5;
|
| +assertEquals(2, f1(arr, 1));
|
|
|