| 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: --harmony-do-expressions --allow-natives-syntax | 5 // Flags: --harmony-do-expressions --allow-natives-syntax --no-always-opt |
| 6 |
| 7 assertFalse(isAlwaysOptimize()); |
| 6 | 8 |
| 7 function returnValue(v) { return v; } | 9 function returnValue(v) { return v; } |
| 8 function MyError() {} | 10 function MyError() {} |
| 9 var global = this; | 11 var global = this; |
| 10 | 12 |
| 11 function TestBasic() { | 13 function TestBasic() { |
| 12 // Looping and lexical declarations | 14 // Looping and lexical declarations |
| 13 assertEquals(512, returnValue(do { | 15 assertEquals(512, returnValue(do { |
| 14 let n = 2; | 16 let n = 2; |
| 15 for (let i = 0; i < 4; i++) n <<= 2; | 17 for (let i = 0; i < 4; i++) n <<= 2; |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 let nums = []; | 298 let nums = []; |
| 297 for (let i = 0; i < 1000; ++i) { | 299 for (let i = 0; i < 1000; ++i) { |
| 298 let value = (Math.random() * 100) | 0; | 300 let value = (Math.random() * 100) | 0; |
| 299 nums.push(value === 0 ? 1 : value), nums; | 301 nums.push(value === 0 ? 1 : value), nums; |
| 300 } | 302 } |
| 301 }; | 303 }; |
| 302 assertEquals(numbers.length, 1000); | 304 assertEquals(numbers.length, 1000); |
| 303 } | 305 } |
| 304 | 306 |
| 305 for (var i = 0; i < 64; ++i) TestOSR(); | 307 for (var i = 0; i < 64; ++i) TestOSR(); |
| OLD | NEW |