You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
401 B

function test() {
var src = [];
var i;
var fun;
src.push('(function outer() {');
for (i = 0; i < 100; i++) {
src.push(' function inner' + i + '() {}');
}
src.push('})');
//print(src.join('\n'));
fun = eval(src.join('\n'));
for (i = 0; i < 1e4; i++) {
fun();
}
}
try {
test();
} catch (e) {
print(e.stack || e);
throw e;
}