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

Editorial: Object Environment Record improvements #2287

Merged
merged 5 commits into from
Mar 18, 2021

Conversation

jmdyck
Copy link
Collaborator

@jmdyck jmdyck commented Jan 23, 2021

Resolves #2285.

The first 3 commits (which could be squashed before merging) add a parameter to NewObjectEnvironment that supplies the value for the new environment's withEnvironment flag, as suggested in whatwg PR 6086. The HTML spec has 3 calls to NewObjectEnvironment that would need to add an argument.

The 4th commit introduces fields [[BindingObject]] and [[WithEnvironmentFlag]] where formerly algorithms would refer to the binding object for _envRec_ and the _withEnvironment_ flag of _envRec_ respectively.

The 5th commit just renames _bindings_ to _bindingObject_ when it receives a [[BindingObject]].

@jmdyck
Copy link
Collaborator Author

jmdyck commented Jan 23, 2021

Also resolves this comment from @michaelficarra in PR #1697.

spec.html Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
Copy link
Contributor

@bakkot bakkot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than style nits.

@bakkot bakkot added the editor call to be discussed in the next editor call label Jan 24, 2021
@jmdyck
Copy link
Collaborator Author

jmdyck commented Jan 25, 2021

(force-pushed because I forgot to note that NewObjectEnvironment's _E_ parameter could be *null*.)

spec.html Show resolved Hide resolved
spec.html Show resolved Hide resolved
@bakkot bakkot removed the editor call to be discussed in the next editor call label Feb 3, 2021
@jmdyck
Copy link
Collaborator Author

jmdyck commented Feb 4, 2021

force-pushed to:

  • rebase to master
  • revert the style of NewObjectEnvironment
  • rename [[WithEnvironmentFlag]] to [[IsWithEnvironment]]
  • simplify the 'Meaning' of [[IsWithEnvironment]] to focus on what causes it to be true (a with statement) rather than what effects it has (provides the binding object as an implicit this value for use in function calls).

spec.html Outdated Show resolved Hide resolved
@jmdyck
Copy link
Collaborator Author

jmdyck commented Feb 4, 2021

force-pushed to:

  • rebase to master
  • insert a serial comma

@bakkot bakkot added the editor call to be discussed in the next editor call label Mar 13, 2021
@bakkot bakkot added ready to merge Editors believe this PR needs no further reviews, and is ready to land. and removed editor call to be discussed in the next editor call labels Mar 17, 2021
…9#2287)

... rather than creating "a new object Environment Record" directly.

(Now, all object Environment Records are created via NewObjectEnvironment.)
... when creating an object Environment Record.

(So _withEnvironment_ no longer needs to have a "default" value.)
... that gives the value for the new environment's _withEnvironment_ flag.
Specifically: [[BindingObject]] and [[IsWithEnvironment]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Model object environment records as records
7 participants