Skip to content

Editorial: Have NewGlobalEnvironment invoke NewDeclarativeEnvironment#2891

Merged
ljharb merged 1 commit intotc39:mainfrom
jmdyck:NewDeclarativeEnvironment
Sep 29, 2022
Merged

Editorial: Have NewGlobalEnvironment invoke NewDeclarativeEnvironment#2891
ljharb merged 1 commit intotc39:mainfrom
jmdyck:NewDeclarativeEnvironment

Conversation

@jmdyck
Copy link
Collaborator

@jmdyck jmdyck commented Sep 4, 2022

In NewDeclarativeEnvironment, allow parameter _E_ to be *null*,
and in NewGlobalEnvironment, change
a new declarative Environment Record containing no bindings
to
NewDeclarativeEnvironment(*null*)

History: NewDeclarativeEnvironment(*null*) used to have different semantics, which would have been wrong for NewGlobalEnvironment, so the latter used a new declarative Environment Record containing no bindings instead. But the merge of PR #1697 changed the semantics of NewDeclarativeEnvironment, and now it makes sense for NewGlobalEnvironment to call it.

The first commit in PR #2287 did something analogous for NewObjectEnvironment and NewGlobalEnvironment's call to it.

(prompted by engine262/engine262#166)

@syg syg added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Sep 28, 2022
In NewDeclarativeEnvironment, allow parameter `_E_` to be `*null*`,
and in NewGlobalEnvironment, change
`a new declarative Environment Record containing no bindings`
to
`NewDeclarativeEnvironment(*null*)`
@ljharb ljharb force-pushed the NewDeclarativeEnvironment branch from 8ae38ce to 1376165 Compare September 29, 2022 05:37
@ljharb ljharb merged commit 1376165 into tc39:main Sep 29, 2022
@jmdyck jmdyck deleted the NewDeclarativeEnvironment branch September 29, 2022 21:12
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.

5 participants