OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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: --allow-natives-syntax | 5 // Flags: --allow-natives-syntax |
6 | 6 |
7 function literals_sharing_test(warmup, optimize) { | 7 function literals_sharing_test(warmup, optimize) { |
8 function closure() { | 8 function closure() { |
9 // Ensure small array literals start in specific element kind mode. | 9 // Ensure small array literals start in specific element kind mode. |
10 assertTrue(%HasFastSmiElements([])); | 10 assertTrue(%HasFastSmiElements([])); |
(...skipping 24 matching lines...) Expand all Loading... |
35 literals_sharing_test(warmup, false); | 35 literals_sharing_test(warmup, false); |
36 warmup = false; | 36 warmup = false; |
37 } | 37 } |
38 print("iter: " + i + ", opt: true"); | 38 print("iter: " + i + ", opt: true"); |
39 literals_sharing_test(warmup, true); | 39 literals_sharing_test(warmup, true); |
40 } | 40 } |
41 | 41 |
42 | 42 |
43 function stress_opt_test() {} | 43 function stress_opt_test() {} |
44 stress_opt_test(); | 44 stress_opt_test(); |
45 if (%GetOptimizationStatus(stress_opt_test) == 2) { | 45 var opt_status = %GetOptimizationStatus(stress_opt_test); |
| 46 if ((opt_status & V8OptimizationStatus.kAlwaysOptimize) === 0) { |
46 // This test is not suitable for --always-opt mode. | 47 // This test is not suitable for --always-opt mode. |
47 test(); | 48 test(); |
48 } | 49 } |
OLD | NEW |