[[OwnPropertyKeys]] key ordering

Andreas Rossberg rossberg at google.com
Tue Apr 22 08:45:57 PDT 2014

On 22 April 2014 16:52, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
> On Apr 22, 2014, at 12:02 AM, Andreas Rossberg wrote:
>> On 19 April 2014 20:14, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
>>> The ordering I propose is:
>>> 1) All array index property keys, in ascending array index numeric order. Followed by:
>>> 2) All other string property keys, in property creation order. Followed by:
>>> 3) All symbol property keys, in property creation order
>> Creation order? I don't know about other VM's, but for V8 it's
>> unlikely that we are willing to pay the price for tracking that
>> accurately.
> My recollection of the last time we surveyed this was that all major engines did for-in enumeration of non-array index own property keys in creations/insertion order.  Has something changed for V8 in this regard?  My understanding is that the web depends upon that ordering for such properties.

We do track it for up to 2^24 properties, after that we give up. As
far as the web is concerned, that is more than enough (and you most
likely run OOM before that anyway). A specialised test might try to
push it, though. I suppose you could argue that is simply an
implementation limit, like stack limits.


More information about the es-discuss mailing list