archives

« Bugzilla Issues Index

#1223 — 8.3.19 Ordinary Function Objects only applies to sloppy functions


As you and I discussed verbally, strict functions need to such special [[GetP]] and [[GetOwnProperty]] internal methods, since the poisoning by accessors takes care of it in an ordinary way. Likewise, bound functions and builtin functions are ordinarily poisoned. So all this would be simpler if sloppy functions were classified as exotic and strict functions were ordinary.

I love you suggestion that implementations not providing a magic "caller" feature on sloppy functions also don't need this special [[GetP]] and [[GetOwnProperty]]. We should also exempt implementations that choose to poison "caller" (and "arguments") on sloppy functions. In both cases, perhaps those sloppy functions are ordinary?

8.3.19.3 and 18.3.19.4 talk about first calling the "default ordinary object" [[GetP]] and [[GetOwnProperty]] methods respectively. But those that call the ordinary one would therefore not be calling the "non-standard legacy feature". For those sloppy functions that do provide the "non-standard legacy feature", we can just specify that this non-standard legacy feature" must not reveal non-sloppy functions. Then we don't need to corrupt the definition of [[GetOwnProperty]].


Mark,

We still have 9.2.1 [[GetOwnProperty]] for ECMAScript functions and built-ins (9.3)

You should check if we have sufficient langauge in 16.1 to allow us to get rid of 9.2.1


(In reply to Allen Wirfs-Brock from comment #1)
> Mark,
>
> We still have 9.2.1 [[GetOwnProperty]] for ECMAScript functions and
> built-ins (9.3)
>
> You should check if we have sufficient langauge in 16.1 to allow us to get
> rid of 9.2.1

It looks to me like we do, which would be great.

But double check me on this. Do you see any loophole? Could there be any observable difference between the implementations that Rev34 would allow, and those it would allow with 9.2.1 simplified?


fixed in rev35 editor's draft

eliminated the special [[GetOwnProperty]] as clause 16.1 makes it unnecessary


fixed in rev35