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 --harmony-sloppy-let --allow-natives-syntax | 5 // Flags: --harmony-do-expressions --harmony-sloppy-let --allow-natives-syntax |
6 // Flags: --harmony-default-parameters --harmony-destructuring | 6 // Flags: --harmony-default-parameters --harmony-destructuring-bind |
7 // Flags: --harmony-completion | 7 // Flags: --harmony-completion |
8 | 8 |
9 function returnValue(v) { return v; } | 9 function returnValue(v) { return v; } |
10 function MyError() {} | 10 function MyError() {} |
11 var global = this; | 11 var global = this; |
12 | 12 |
13 function TestBasic() { | 13 function TestBasic() { |
14 // Looping and lexical declarations | 14 // Looping and lexical declarations |
15 assertEquals(512, returnValue(do { | 15 assertEquals(512, returnValue(do { |
16 let n = 2; | 16 let n = 2; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 let nums = []; | 268 let nums = []; |
269 for (let i = 0; i < 1000; ++i) { | 269 for (let i = 0; i < 1000; ++i) { |
270 let value = (Math.random() * 100) | 0; | 270 let value = (Math.random() * 100) | 0; |
271 nums.push(value === 0 ? 1 : value), nums; | 271 nums.push(value === 0 ? 1 : value), nums; |
272 } | 272 } |
273 }; | 273 }; |
274 assertEquals(numbers.length, 1000); | 274 assertEquals(numbers.length, 1000); |
275 } | 275 } |
276 | 276 |
277 for (var i = 0; i < 64; ++i) TestOSR(); | 277 for (var i = 0; i < 64; ++i) TestOSR(); |
OLD | NEW |