Some Array methods don't consider array holes and length

Allen Wirfs-Brock allen at wirfs-brock.com
Mon Jun 25 11:05:48 PDT 2012


On Jun 25, 2012, at 1:18 AM, Yusuke Suzuki wrote:

> Hello,
> 
> In some Array methods such as 'slice', 'splice', they don't [[Put]] 'length' value.
> And they check [[HasProperty]] before [[DefineOwnProperty]]. As the result, they waste empty trailing elements, but it is not compatible behavior to ES3.

For splice, this has already been reported as https://bugs.ecmascript.org/show_bug.cgi?id=332 
concat is bug https://bugs.ecmascript.org/show_bug.cgi?id=129 

I've added a new bug for slice: https://bugs.ecmascript.org/show_bug.cgi?id=417 

Are there any other cases like these that you have identified?

Allen


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120625/9b310cc2/attachment.html>


More information about the es-discuss mailing list