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