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

Unified Diff: test/mjsunit/shared-function-tier-up-turbo.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-turbo.js
diff --git a/test/mjsunit/shared-function-tier-up-turbo.js b/test/mjsunit/shared-function-tier-up-turbo.js
index 76a8b01c43d97413b7d18663c1a540a69954dc86..bf27bc77a23d6e3650a781772e18226b2d8a2e5c 100644
--- a/test/mjsunit/shared-function-tier-up-turbo.js
+++ b/test/mjsunit/shared-function-tier-up-turbo.js
@@ -5,6 +5,10 @@
// Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax
// Flags: --ignition-staging --turbo --no-always-opt
+// If we are always or never optimizing it is useless.
+assertFalse(isAlwaysOptimize());
+assertFalse(isNeverOptimize());
+
(function() {
var sum = 0;
var i = 0;
@@ -14,20 +18,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 interpreted code.
- assertEquals(8, %GetOptimizationStatus(f));
+ assertTrue(isInterpreted(f));
// Run twice (i = 0, 1), then tier-up.
%OptimizeFunctionOnNextCall(f);
} else if (i == 2) {
// Tier-up at i = 2 should go up to turbofan.
- assertEquals(7, %GetOptimizationStatus(f));
+ assertTrue(isTurboFanned(f));
}
}
})()

Powered by Google App Engine
This is Rietveld 408576698