-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factor out all ordinary object internal methods into OrdinaryXyz()? #91
Comments
You could use the same language as in 9.4.4 Arguments Exotic Objects, for example:
[[Get]], [[Set]] and [[Delete]] for arguments objects use this wording to call the ordinary internal methods. |
I guess that covers it; thanks! |
Is there a reason ECMAScript uses both patterns? |
@annevk which patterns are you referring to? |
What @anba mentioned and using OrdinaryInternalMethod abstract operations. |
Also, if I say use "default ordinary object [[Get]] internal method", does that mean the [[GetOwnProperty]] call it does (and similar ones) are the normal non-overridden variants as well? |
@annevk If you say "call the default ordinary object [[Get]] internal method" (and you need to include a section reference) you mean exactly and only that. If you say "call the [[GetOwnProperty internal method of obj" (or just say obj.[GetOwnProperty] ) you are going throw the meta-level dynamic dispatch to the specific [[GetOwnPrperty]] associated with obj. |
It's still not clear that if you say "call the default ordinary object [[Get]] internal method" that means that the internal methods that that algorithm invokes, are also the default ordinary ones. At least not to me. |
HTML needs to specify a couple exotic objects. (Web IDL also needs to do so, if it ever gets updated to ES2015.) In many cases the behavior is "if flag X is set, throw. Otherwise, do what an ordinary object would do."
For a couple internal methods, there are pre-existing abstract operations we can use: OrdinaryGetOwnProperty and OrdinaryDefineOwnProperty. But for all others, there are not.
I see two potential ways we could spec such exotic objects:
Any advice? Is there a chance (1) could clean up parts of the ES spec that are currently duplicated?
/cc @annevk @allenwb
The text was updated successfully, but these errors were encountered: