Open Bug 1533722 Opened 7 years ago Updated 1 year ago

Interpreter-only maximum stack size for spread-calls is 100x lower than normal calls

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox67 --- affected

People

(Reporter: anba, Unassigned)

References

(Blocks 1 open bug)

Details

var i = 0;
function f() {
    i += 1;
    f(...[]);
}
try { f() } catch {}
print(i);

Prints a meager 598 with --no-baseline whereas

var i = 0;
function f() {
    i += 1;
    f();
}
try { f() } catch {}
print(i);

prints 49999 with --no-baseline.

I don't know if it's important to improve this case, but I thought filing a bug to document it won't hurt. :-)


For comparison:

Compiler Non-Spread Spread
Interpreter 49999 598
Baseline 7220 6497
Ion 43322 10830

Good find, yeah this is because for spread calls we push a whole new Activation and Interpret C++ frame whereas for simple scripted calls we can push inline frames...

Generated interpreter work should also fix this..

(In reply to Jan de Mooij [:jandem] from comment #1)

Good find, [...]

Thanks should go to :arai, because only bug 1530745, comment #11 got me to start thinking over this case! :-)

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.