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: --strong-mode --harmony-reflect | 5 // Flags: --strong-mode --harmony-reflect |
6 // Flags: --harmony-rest-parameters --allow-natives-syntax | 6 // Flags: --allow-natives-syntax |
7 | 7 |
8 'use strict'; | 8 'use strict'; |
9 | 9 |
10 | 10 |
11 function generateArguments(n, prefix) { | 11 function generateArguments(n, prefix) { |
12 let a = []; | 12 let a = []; |
13 if (prefix) { | 13 if (prefix) { |
14 a.push(prefix); | 14 a.push(prefix); |
15 } | 15 } |
16 for (let i = 0; i < n; i++) { | 16 for (let i = 0; i < n; i++) { |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 if (argumentCount < parameterCount) { | 332 if (argumentCount < parameterCount) { |
333 assertThrows(code, TypeError); | 333 assertThrows(code, TypeError); |
334 } else { | 334 } else { |
335 assertDoesNotThrow(code); | 335 assertDoesNotThrow(code); |
336 } | 336 } |
337 } | 337 } |
338 } | 338 } |
339 } | 339 } |
340 } | 340 } |
341 })(); | 341 })(); |
OLD | NEW |