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

Unified Diff: test/mjsunit/compiler/recursive-deopt.js

Issue 6821009: Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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
Index: test/mjsunit/compiler/recursive-deopt.js
diff --git a/test/mjsunit/compiler/recursive-deopt.js b/test/mjsunit/compiler/recursive-deopt.js
index 366f59ae1be3546ba78cbf4a29104c862b2471d2..2a01b50bde3409005d50deb00eabac4eee95918c 100644
--- a/test/mjsunit/compiler/recursive-deopt.js
+++ b/test/mjsunit/compiler/recursive-deopt.js
@@ -25,6 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --allow-natives-syntax
function f(n) {
// Force deopt in both leaf case and when returning. To make
@@ -42,7 +43,13 @@ function RunTests() {
var one = 1;
-for (var i = 0; i < 1000000; i++) RunTests();
+for (var i = 0; i < 5; i++) RunTests();
+%OptimizeFunctionOnNextCall(f);
+%OptimizeFunctionOnNextCall(RunTests);
+RunTests();
var one = { valueOf: function() { return 1; } };
-for (var j = 0; j < 100000; j++) RunTests();
+for (var j = 0; j < 5; j++) RunTests();
+%OptimizeFunctionOnNextCall(f);
+%OptimizeFunctionOnNextCall(RunTests);
+RunTests();

Powered by Google App Engine
This is Rietveld 408576698