blob: 65ceec04041b610deed3a7bc2cd8dcd966269b16 [file] [log] [blame]
//@ if $architecture == "mips" then skip else slow! end
function runNearStackLimit(f) {
function t() {
try {
return t();
} catch (e) {
String(e);
return f();
}
}
return t()
}
function repeat(func, count) {
for (let i = 0; i < count; i++) {
try {
func(i);
} catch (e) {}
}
}
let array = [Error, String, RegExp, {}, class cls {}];
for (let item of array) {
runNearStackLimit(() => {
return repeat(void 0, 30);
})
}
repeat(function (v) {
let func = new Proxy(function () {
gc();
}, {});
runNearStackLimit(() => {
new func();
})
}, 5);