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)); |
} |
} |
})() |