blob: 619461dc81ba42f4ef69e6788e0c478dd4110ac6 [file] [log] [blame]
function test(b, f) {
if (b)
return f(b);
}
noInline(test);
function throwError(b) {
if (b) {
try {
throw new Error;
} catch(e) { }
}
return 2;
}
noInline(throwError);
function makeFoo() {
return function foo(b) {
throwError(b);
OSRExit();
}
}
let foos = [makeFoo(), makeFoo()];
for (let i = 0; i < 10000; ++i) {
test(!!(i%2), foos[((Math.random() * 100) | 0) % foos.length]);
}