blob: afe21fa9e0b60c85218190fc5fbdc963ce281b79 [file] [log] [blame]
//@ runDefault("--useConcurrentJIT=0", "--useConcurrentGC=0", "--useSamplingProfiler=1", "--collectSamplingProfilerDataForJSCShell=1", "--repatchBufferingCountdown=1")
let oThrow = {
g: 0,
get f() {
throw new Error();
}
};
function foo(x, j) {
let o = f(x, j);
try {
o = o.f;
} catch (e) {
gc();
o === 0;
}
}
noInline(foo);
function f(x, j) {
if (x) {
return oThrow;
}
if (j % 2) {
return {};
}
return {
get f() {}
};
}
noInline(f);
for (let i = 0; i < 20000; i++) {
foo(false, i);
}
foo(true);