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

Unified Diff: test/mjsunit/shared-function-tier-up-default.js

Issue 2654733004: [tests] Make assertOptimized()/assertUnoptimized() great again. (Closed)
Patch Set: Rebasing for relanding Created 3 years, 11 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/shared-function-tier-up-default.js
diff --git a/test/mjsunit/shared-function-tier-up-default.js b/test/mjsunit/shared-function-tier-up-default.js
index 6671060e4f8aa65b9adb22a76721ead65b52ce09..40af1a4464afb87c057a11ca0a31e16c1b25cc01 100644
--- a/test/mjsunit/shared-function-tier-up-default.js
+++ b/test/mjsunit/shared-function-tier-up-default.js
@@ -6,6 +6,10 @@
// Flags: --no-ignition --no-ignition-staging --no-turbo
// Flags: --crankshaft --no-always-opt
+// If we are always or never optimizing it is useless.
+assertFalse(isAlwaysOptimize());
+assertFalse(isNeverOptimize());
+
(function() {
var sum = 0;
var i = 0;
@@ -15,20 +19,15 @@
}
sum += f(i);
- if (%GetOptimizationStatus(f) == 3 || %GetOptimizationStatus(f) == 4) {
- // If we are always or never optimizing f, just exit, this test is useless.
- return;
- }
-
if (i == 1) {
// f must be baseline code.
- assertEquals(2, %GetOptimizationStatus(f));
+ assertTrue(isBaselined(f));
// Run twice (i = 0, 1), then tier-up.
%OptimizeFunctionOnNextCall(f);
} else if (i == 2) {
// Tier-up at i = 2 should go up to crankshaft.
- assertEquals(1, %GetOptimizationStatus(f));
+ assertTrue(isCrankshafted(f));
}
}
})()

Powered by Google App Engine
This is Rietveld 408576698