Skip to content
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

All Complex Specification Types Should be Reference-Like #17

Open
IgnoredAmbience opened this issue Jun 20, 2018 · 0 comments
Open

All Complex Specification Types Should be Reference-Like #17

IgnoredAmbience opened this issue Jun 20, 2018 · 0 comments
Labels
future work jsref Tasks impacting jsref design and codebase. major refactor

Comments

@IgnoredAmbience
Copy link
Member

IgnoredAmbience commented Jun 20, 2018

Note this clarification text has been added to the spec regarding interpretation of variable bindings for record, list, and other complex specification types:

Algorithm steps may declare named aliases for any value using the form “Let x be someValue”. These aliases are reference-like in that both x and someValue refer to the same underlying data and modifications to either are visible to both. Algorithm steps that want to avoid this reference-like behavior should explicitly make a copy of the right-hand side: “Let x be a copy of someValue” creates a shallow copy of someValue.

This was added in response to my clarification request in tc39/ecma262#752 noting that my interpretation of the behaviour of CompletePropertyDescriptor and its usage in [[GetOwnProperty]] for Proxy objects.

I imagine that to guarantee correctness and closeness to the spec in the future, we're going to need to adjust jsexplain's heap structure to match this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future work jsref Tasks impacting jsref design and codebase. major refactor
Projects
None yet
Development

No branches or pull requests

1 participant