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

Rewrite References as Records #333

Closed
claudepache opened this issue Jan 28, 2016 · 0 comments · Fixed by #2085
Closed

Rewrite References as Records #333

claudepache opened this issue Jan 28, 2016 · 0 comments · Fixed by #2085

Comments

@claudepache
Copy link
Contributor

Hi,

Do you think it is a good idea to rewrite References as Records?

A Reference would be a Record with the following fields:

Field Value Remarks
[[base]]
One of:
  • an ECMAScript language value different from undefined and null;
  • an Environment Record;
  • empty.
A value of empty indicates that the Reference could not be resolved to a binding. [Note: I have switched from undefined to empty]
[[referencedName]] A String or a Symbol
[[strict]] A Boolean
[[thisValue]] empty or an ECMAScript language value A Reference whose [[thisValue]] component is not empty is called a Super Reference

And the following prose:

Return a value of type Reference whose base value is undefined, whose referenced name is name, and whose strict reference flag is strict.

would become:

Return Reference{[[base]]: empty, [[referencedName]]: name, [[strict]]: true, [[thisValue]]: empty}.

or even:

Return Reference(empty, name, true).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants