blob: e03fd43542ea5d9f4871c10a10f834a4ca0a06dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Don't Baseline-compile the huge array literal with --baseline-eager
// as it's slow, especially in debug builds.
setJitCompilerOption("baseline.warmup.trigger", 2);
function f(N) {
var body = "return [";
for (var i = 0; i < N-1; i++)
body += "1,";
body += "2]";
var f = new Function(body);
var arr = f();
assertEq(arr.length, N);
assertEq(arr[N-1], 2);
}
f(1000000);
|