OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 function __f_17(__v_9) { | |
6 var __v_10 = 0; | |
Jakob Kummerow
2016/11/23 17:17:06
nit: unused variable
danno
2016/11/29 14:40:00
Done.
| |
7 for (var count = 0; count < 20000; ++count) { | |
8 if (count < 100) { | |
9 __v_9.push(3); | |
10 } else if (count < 2500) { | |
11 __v_9.push(2.5); | |
12 } else { | |
13 __v_9.push(undefined); | |
Jakob Kummerow
2016/11/23 17:17:06
nit: I'd push some recognizable sentinel. Maybe |t
danno
2016/11/29 14:40:00
Done.
| |
14 } | |
15 } | |
16 return __v_9; | |
17 } | |
18 | |
19 let a = __f_17([]); | |
20 assertEquals(a[0], 3); | |
21 assertEquals(a[10], 3); | |
22 assertEquals(a[2499], 2.5); | |
23 assertEquals(a[10000], undefined); | |
OLD | NEW |