10.6 Arguments object step 5

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Mar 1 14:50:45 PST 2011

It is cruft left over from earlier revisions of the algorithm.  At one time steps 4-6 were:
4.	Let Object be the standard built-in Object constructor (15.2.3). 
5.	Set the [[Prototype]] internal property of obj to the standard built-in Array prototype object (15.4.4). 
6.	Call the [[DefineOwnProperty]] internal method on obj passing "constructor", the Property Descriptor
{[[Value]]: Object, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}, and false as

step 4 was simply identify a value to be used as the [[Value]] in step 6.

This all dates back to a time where we were trying to use Array.prototype as the [[Prototype]] value of arguments objects.  Do make this work in a compatible manner  with edition 3 there was various hackery involved such as this.  Ultimately it was discovered that we couldn't make such an arguments object compatible enough to avoid web breakage, so we reverted to using Object.prototype as the [[Prototype]].  The line you've identified is inconsequential detritus that was missed.  I'll file a  bug on this so it will get corrected in future editions.

A useful resource for this sort of spec archeology is the archive of working drafts at http://wiki.ecmascript.org/doku.php?id=es3.1:es3.1_proposal_working_draft 


On Mar 1, 2011, at 3:29 AM, David Bruant wrote:

> Hi,
> In the 10.6 section, step 5 is "Let /Object/ be the standard built-in Object constructor (15.2.2)."
> But this /Object/ variable is never used in the rest of the algorithm.
> Is there a reason for it to be here?
> David
> _______________________________________________
> es5-discuss mailing list
> es5-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es5-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es5-discuss/attachments/20110301/6d714acf/attachment.html>

More information about the es5-discuss mailing list