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

Normative: Add class static initialization blocks #2440

Merged
merged 1 commit into from
Sep 8, 2021

Conversation

rbuckton
Copy link
Contributor

This adds the specification text from https://github.com/tc39/proposal-class-static-block, currently at Stage 3.

@ljharb ljharb added needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 normative change Affects behavior required to correctly evaluate some ECMAScript source text pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. proposal This is related to a specific proposal, and will be closed/merged when the proposal reaches stage 4. labels Jun 23, 2021
Copy link
Collaborator

@jmdyck jmdyck left a comment

Choose a reason for hiding this comment

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

Also, I believe the following SDO definitions are needed:

  • EvaluateBody for ClassStaticBlockBody
  • PrivateBoundIdentifiers for ClassStaticBlock
  • ComputedPropertyContainsAwait for ClassStaticBlock

spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
@rbuckton rbuckton force-pushed the class-static-block branch 2 times, most recently from 1875a2e to 5319cfe Compare June 24, 2021 20:19
@rbuckton
Copy link
Contributor Author

Thanks @jmdyck. I believe I've addressed your feedback, though I chose to use [[BodyFunction]] over [[Function]] and _bodyFunction_ over _func_ to further improve clarity.

jmdyck
jmdyck previously requested changes Jun 25, 2021
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
@rbuckton rbuckton force-pushed the class-static-block branch from 5319cfe to 3c4fd9a Compare June 28, 2021 20:40
@ljharb ljharb force-pushed the master branch 3 times, most recently from 3d0c24c to 7a79833 Compare June 29, 2021 02:21
@rbuckton
Copy link
Contributor Author

@tc39/ecma262-editors would you be able to review this?

@ljharb ljharb requested review from syg, michaelficarra, bakkot and a team August 12, 2021 22:07
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
@rbuckton
Copy link
Contributor Author

SpiderMonkey intends to ship this unflagged in 93, and it is already shipping in V8. I'd like to seek Stage 4 at the upcoming meeting, assuming an editor review is complete and approved prior to the agenda submission deadline at the end of the week.

@bakkot bakkot added editor call to be discussed in the next editor call has test262 tests and removed needs test262 tests The proposal should specify how to test an implementation. Ideally via github.com/tc39/test262 labels Aug 18, 2021
spec.html Outdated Show resolved Hide resolved
@rbuckton rbuckton force-pushed the class-static-block branch from 7a6936c to 6194172 Compare August 18, 2021 19:54
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html 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 apart from open comments.

@rbuckton rbuckton force-pushed the class-static-block branch from 657f41e to 3a335f7 Compare August 25, 2021 01:10
@bakkot bakkot removed the editor call to be discussed in the next editor call label Aug 25, 2021
@ljharb ljharb added has stage 4 This PR represents a proposal that has achieved stage 4, and is ready to merge. and removed pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. labels Aug 31, 2021
@bakkot bakkot added editor call to be discussed in the next editor call 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 Sep 8, 2021
@ljharb ljharb dismissed jmdyck’s stale review September 8, 2021 22:07

changes addressed

ljharb pushed a commit to rbuckton/ecma262 that referenced this pull request Sep 8, 2021
@ljharb ljharb force-pushed the class-static-block branch from 3a335f7 to b51a822 Compare September 8, 2021 22:16
@ljharb ljharb force-pushed the class-static-block branch from b51a822 to 51e28c7 Compare September 8, 2021 22:17
@ljharb ljharb merged commit 51e28c7 into tc39:master Sep 8, 2021
mathiasbynens pushed a commit to mathiasbynens/ecma262 that referenced this pull request Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has stage 4 This PR represents a proposal that has achieved stage 4, and is ready to merge. has test262 tests normative change Affects behavior required to correctly evaluate some ECMAScript source text proposal This is related to a specific proposal, and will be closed/merged when the proposal reaches stage 4. 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