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

Unified Diff: test/mjsunit/never-optimize.js

Issue 19776006: Fix %NeverOptimizeFunction runtime call. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add assert for safety. Created 7 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 | « test/mjsunit/generated-transition-stub.js ('k') | test/mjsunit/opt-elements-kind.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/never-optimize.js
diff --git a/test/mjsunit/never-optimize.js b/test/mjsunit/never-optimize.js
index 553cd17d6371a0f5ddaa50de5b06fefcabbe9acb..06885abb925d6fa2f6265b9346db1d91f5b381ad 100644
--- a/test/mjsunit/never-optimize.js
+++ b/test/mjsunit/never-optimize.js
@@ -36,22 +36,21 @@ if (%GetOptimizationStatus(o1) != 4) {
%OptimizeFunctionOnNextCall(o1);
o1();
- // check that the given function was optimized.
+ // Check that the given function was optimized.
var o1_status = %GetOptimizationStatus(o1);
assertTrue(o1_status == 1 // optimized
|| o1_status == 3 // optimized (always opt)
|| o1_status == 5); // lazy recompile requested
- // Test the %NeverOptimize runtime call.
+ // Test the %NeverOptimizeFunction runtime call.
+ %NeverOptimizeFunction(u1);
function u1() {
- %NeverOptimize();
}
function u2() {
+ u1();
}
- %NeverOptimize(u2);
-
u1(); u1();
u2(); u2();
@@ -62,7 +61,6 @@ if (%GetOptimizationStatus(o1) != 4) {
u2(); u2();
// 2 => not optimized.
- assertEquals(2, %GetOptimizationStatus(u1));
- assertEquals(2, %GetOptimizationStatus(u2));
-
+ assertTrue(%GetOptimizationStatus(u1) == 2);
+ assertFalse(%GetOptimizationStatus(u2) == 2);
}
« no previous file with comments | « test/mjsunit/generated-transition-stub.js ('k') | test/mjsunit/opt-elements-kind.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698