Open Bug 698900 Opened 13 years ago Updated 2 years ago

Implement Array.prototype.* methods with unfixed number of parameters with rest parameters

Categories

(Core :: JavaScript Engine, enhancement)

enhancement

Tracking

()

People

(Reporter: bruant.d, Unassigned)

References

Details

It seems (https://mail.mozilla.org/pipermail/es-discuss/2011-July/016124.html) that JS stack suffers when doing something like Array.prototype.push.apply(a1, a2) if a2 is to big of an array.
One idea would to stop thinking as Array.prototype.push as a method with a lot of arguments, but rather think it as Array.prototype.push(...items) (as per "rest parameters"). For any number of elements, there would only be one element in the stack.
Depends on: harmony:restparams
Assignee: general → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.