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

Side by Side Diff: test/mjsunit/shared-function-tier-up-ignition.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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax --ignition- staging --no-turbo 5 // Flags: --mark-shared-functions-for-tier-up --allow-natives-syntax
6 // Flags: --ignition-staging --no-turbo
7 // Flags: --crankshaft --no-always-opt
6 8
7 (function() { 9 (function() {
8 var sum = 0; 10 var sum = 0;
9 var i = 0; 11 var i = 0;
10 for (var i = 0; i < 5; ++i) { 12 for (var i = 0; i < 5; ++i) {
11 var f = function(x) { 13 var f = function(x) {
12 return 2 * x; 14 return 2 * x;
13 } 15 }
14 sum += f(i); 16 sum += f(i);
15 17
(...skipping 16 matching lines...) Expand all
32 assertEquals(2, %GetOptimizationStatus(f)); 34 assertEquals(2, %GetOptimizationStatus(f));
33 35
34 // Run two more times (i = 2, 3), then tier-up to optimized. 36 // Run two more times (i = 2, 3), then tier-up to optimized.
35 %OptimizeFunctionOnNextCall(f); 37 %OptimizeFunctionOnNextCall(f);
36 } else if (i == 4) { 38 } else if (i == 4) {
37 // Tier-up at i = 4 should now go up to crankshaft. 39 // Tier-up at i = 4 should now go up to crankshaft.
38 assertEquals(1, %GetOptimizationStatus(f)); 40 assertEquals(1, %GetOptimizationStatus(f));
39 } 41 }
40 } 42 }
41 })() 43 })()
OLDNEW
« no previous file with comments | « test/mjsunit/shared-function-tier-up-default.js ('k') | test/mjsunit/shared-function-tier-up-turbo.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698