-
Notifications
You must be signed in to change notification settings - Fork 1.3k
(ignore) Normative: Add public and private class fields #1655
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
spec.html
Outdated
1. Replace all occurances of "Return a value of type Reference..." with calls to MakeReference | ||
2. Rename MakeSuperPropertyReference to MakeSuperReference for consistency. | ||
|
||
<emu-clause id="sec-makereference" aoid="MakeReference"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this commented clause be deleted, or uncommented?
spec.html
Outdated
@@ -3309,6 +3322,29 @@ <h1>InitializeReferencedBinding ( _V_, _W_ )</h1> | |||
1. Return _base_.InitializeBinding(GetReferencedName(_V_), _W_). | |||
</emu-alg> | |||
</emu-clause> | |||
|
|||
<!-- | |||
1. Replace all occurences of "Return a value of type Reference..." with calls to MakeReference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this commented section should be uncommented or removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still needs doing, yes. I'm holding off in case there's substantive comments that affect it.
spec.html
Outdated
1. Let _fields_ be the value of _constructor_.[[Fields]]. | ||
1. For each item _fieldRecord_ in order from _fields_, | ||
1. Perform ? DefineField(_O_, _fieldRecord_). | ||
1. Return. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this last step seems kind of implied to me, can/should it be removed?
spec.html
Outdated
|
||
<emu-grammar>ClassElement : FieldDefinition `;`</emu-grammar> | ||
<ul> | ||
<li>It is a Syntax Error if PropName of |FieldDefinition| is `"constructor"`.</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ms2ger "class fields" has been a single proposal since before stage 3; all of it should be added in a single PR - static and instance, public and private.
</emu-alg> | ||
|
||
For all other grammatical productions, recurse on all nonterminals. If any piece returns *true*, then return *true*. Otherwise return *false*. | ||
<emu-note type=editor>TODO: Elaborate the preceding paragraph with spec text inserted in each relevant place</emu-note> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this TODO seems like it needs doing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same: This still needs doing, yes. I'm holding off in case there's substantive comments that affect it.
Deferring to #1668; I’ll keep this one up to date. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Step 2.12.2.8.a.ii and 2.12.2.8.a.iii are missing in this PR yet presented in https://tc39.es/proposal-class-fields/#runtime-semantics-class-definition-evaluation.
@legendecas If you could make a PR to this branch (and the other branches) fixing the issue, then I can merge it in to fix this PR. |
The branch is on @Ms2ger's repo, the PR has to be updated in their repo. So maybe pushing the branch to tc39/ecma262 and till then we can target the branch and review PRs in tc39/ecma262. |
@legendecas you can make a PR directly to that repo (rather than opening up a fourth PR here) |
…, private methods & getters/setters This includes changes from https://tc39.es/proposal-class-fields/. This includes changes from https://tc39.es/proposal-private-methods/. This includes changes from https://tc39.es/proposal-static-class-features/. Co-authored-by: Ms2ger <Ms2ger@gmail.com> Co-authored-by: Ujjwal Sharma <ryzokuken@igalia.com> Co-authored-by: Caio Lima <ticaiolima@gmail.com> Co-authored-by: Michael Dyck <jmdyck@ibiblio.org> Co-authored-by: Kevin Gibbons <bakkot@gmail.com> Co-authored-by: Jordan Harband <ljharb@gmail.com>
no longer an editor; everything addressed in #1668
This includes changes from https://tc39.es/proposal-class-fields/.