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

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

Issue 6821009: Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comments Created 9 years, 8 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 | « test/mjsunit/regress/regress-1210.js ('k') | test/mjsunit/regress/regress-1237.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/regress/regress-1229.js
diff --git a/test/mjsunit/regress/regress-1229.js b/test/mjsunit/regress/regress-1229.js
index 4afb9646ea0dc57dc7b813355abfb3e66fdb2b16..e16d278b3817436f9bb57d5556ceb8a1ed11220f 100644
--- a/test/mjsunit/regress/regress-1229.js
+++ b/test/mjsunit/regress/regress-1229.js
@@ -56,11 +56,17 @@ function h(z2, y2) {
return f(local_y, local_z); /* f should be inlined into h */
}
-for (var i = 0; i < 100000; i++) f(2, 3);
+for (var i = 0; i < 5; i++) f(2, 3);
+%OptimizeFunctionOnNextCall(f);
+f(2, 3);
-for (var i = 0; i < 100000; i++) g(3, 2);
+for (var i = 0; i < 5; i++) g(3, 2);
+%OptimizeFunctionOnNextCall(g);
+g(3, 2);
-for (var i = 0; i < 100000; i++) h(6, 4);
+for (var i = 0; i < 5; i++) h(6, 4);
+%OptimizeFunctionOnNextCall(h);
+h(6, 4);
// Check that %_IsConstructCall returns correct value when inlined
var NON_CONSTRUCT_MARKER = {};
@@ -76,4 +82,6 @@ function bar(x, y, z) {
assertEquals(construct, CONSTRUCT_MARKER);
}
-for (var i = 0; i < 100000; i++) new bar(1, 2, 3);
+for (var i = 0; i < 5; i++) new bar(1, 2, 3);
+%OptimizeFunctionOnNextCall(bar);
+bar(1, 2, 3);
« no previous file with comments | « test/mjsunit/regress/regress-1210.js ('k') | test/mjsunit/regress/regress-1237.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698