Index: test/mjsunit/regress/regress-166379.js |
diff --git a/test/mjsunit/regress/regress-2045.js b/test/mjsunit/regress/regress-166379.js |
similarity index 86% |
copy from test/mjsunit/regress/regress-2045.js |
copy to test/mjsunit/regress/regress-166379.js |
index 822ee1fa4641b4a0ba15eee2c2a2e59411db7d4d..b19afbdde630e4eef2b14da12fae14349dbe0d2a 100644 |
--- a/test/mjsunit/regress/regress-2045.js |
+++ b/test/mjsunit/regress/regress-166379.js |
@@ -27,23 +27,13 @@ |
// Flags: --allow-natives-syntax |
-function foo() { |
- assertEquals(2, arguments.length); |
-} |
+function mod(a, b) { return a % b; } |
-function bar() { |
- G.x; |
- return foo.apply(this, arguments); |
-} |
+// Feed integer type info and optimize. |
+assertEquals(0, mod(4, 2)); |
+assertEquals(1, mod(3, 2)); |
+%OptimizeFunctionOnNextCall(mod); |
-function baz() { |
- return bar(1, 2); |
-} |
+// Surprise mod with overflow. |
+assertEquals(-Infinity, 1/mod(-2147483648, -1)); |
-G = {x: 0}; |
-baz(); |
-baz(); |
-%OptimizeFunctionOnNextCall(baz); |
-baz(); |
-delete G.x; |
-baz(); |