Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1276)

Unified Diff: test/mjsunit/regress/regress-2234.js

Issue 10695205: Fix transcendental cache on ARM in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments addressed. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698