blob: cde85dcc8dc2e5e5312c92ba3da1f625b2e3dc2f [file] [log] [blame]
//@ skip if $architecture == "mips"
function runNearStackLimit(f) {
try {
return t();
} catch (e) {
return f();
}
}
let flag = false;
function f1() {
return flag ? {} : 10;
}
noInline(f1);
function f2() {
}
function f3(arg) {
let r = -(arg ? f1() : f2());
}
for (let i = 0; i < 100000; ++i) {
try {
f3(!!(i % 2));
} catch (e) {}
}
flag = true;
for (let i = 0; i < 100000; ++i) try {
runNearStackLimit(() => {
return f3(!!(i % 2));
});
} catch (e) {}