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

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

Issue 2653753007: [tests] Cleanup tests that use assertOptimized()/assertUnoptimized(). (Closed)
Patch Set: Addressing comments 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
« no previous file with comments | « test/mjsunit/modules-turbo.js ('k') | test/mjsunit/object-seal.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 643588ebf41e84c5d42bef8829d9ceb1e756841c..2949f06268a25fb69bab25517debd52f690300ac 100644
--- a/test/mjsunit/never-optimize.js
+++ b/test/mjsunit/never-optimize.js
@@ -25,39 +25,35 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
+// Flags: --allow-natives-syntax --crankshaft --no-always-opt
function o1() {
}
-if (%GetOptimizationStatus(o1) != 4) {
- // 4 == optimization disabled.
- o1(); o1();
- %OptimizeFunctionOnNextCall(o1);
- o1();
+o1(); o1();
+%OptimizeFunctionOnNextCall(o1);
+o1();
- // Check that the given function was optimized.
- assertOptimized(o1);
+// Check that the given function was optimized.
+assertOptimized(o1);
- // Test the %NeverOptimizeFunction runtime call.
- %NeverOptimizeFunction(u1);
- function u1() {
- }
+// Test the %NeverOptimizeFunction runtime call.
+%NeverOptimizeFunction(u1);
+function u1() {
+}
- function u2() {
- u1();
- }
+function u2() {
+ u1();
+}
- u1(); u1();
- u2(); u2();
+u1(); u1();
+u2(); u2();
- %OptimizeFunctionOnNextCall(u1);
- %OptimizeFunctionOnNextCall(u2);
+%OptimizeFunctionOnNextCall(u1);
+%OptimizeFunctionOnNextCall(u2);
- u1(); u1();
- u2(); u2();
+u1(); u1();
+u2(); u2();
- // 2 => not optimized.
- assertUnoptimized(u1);
- assertOptimized(u2);
-}
+assertUnoptimized(u1);
+assertOptimized(u2);
« no previous file with comments | « test/mjsunit/modules-turbo.js ('k') | test/mjsunit/object-seal.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698