Object property for-in enumeration as an internal method
bruant at enseirb-matmeca.fr
Sat Mar 12 14:45:24 PST 2011
I think it would be worth for spec readability to give a name to the
for-in property enumeration internal method and list it as such in ES5
8.6.2 Table 8 regardless the fact that it is implementation-dependent.
>From the spec edition point of view, it would require a bit of
re-writing for the for-in statement semantics algorithm.
I have noticed that there is no mention of this internal method in
For the record, this internal method is "called" in (at least I haven't
found any other place):
* 12.6.4 The for-in Statement (twice)
* 22.214.171.124 Object.defineProperties
* 126.96.36.199 Object.keys
It would probably help to define more easily how proxies reify
Object.keys. The 'enumerate' trap would just reify this new internal
method ( [[enumerate]]? ) and as such there would be no need to modify
the for-in statement definition as it is in
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss