Index: test/mjsunit/regress/regress-2234.js |
diff --git a/test/mjsunit/regress/regress-2045.js b/test/mjsunit/regress/regress-2234.js |
similarity index 83% |
copy from test/mjsunit/regress/regress-2045.js |
copy to test/mjsunit/regress/regress-2234.js |
index 822ee1fa4641b4a0ba15eee2c2a2e59411db7d4d..8da513e30e45352330354d12ab8bcf6e6cf64c02 100644 |
--- a/test/mjsunit/regress/regress-2045.js |
+++ b/test/mjsunit/regress/regress-2234.js |
@@ -27,23 +27,15 @@ |
// Flags: --allow-natives-syntax |
-function foo() { |
- assertEquals(2, arguments.length); |
+function test(i) { |
+ // Overwrite random parts of the transcendental cache. |
+ Math.sin(i / 1779 * Math.PI); |
+ // Check whether the first cache line has been accidentally overwritten |
+ // with incorrect key. |
+ assertEquals(0, Math.sin(0)); |
} |
-function bar() { |
- G.x; |
- return foo.apply(this, arguments); |
+for (i = 0; i < 10000; ++i) { |
+ test(i); |
+ if (i == 0) %OptimizeFunctionOnNextCall(test); |
} |
- |
-function baz() { |
- return bar(1, 2); |
-} |
- |
-G = {x: 0}; |
-baz(); |
-baz(); |
-%OptimizeFunctionOnNextCall(baz); |
-baz(); |
-delete G.x; |
-baz(); |