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 public and private class fields. #1655

Open
wants to merge 10 commits into
base: master
from

Conversation

@Ms2ger
Copy link
Contributor

commented Aug 6, 2019

This includes changes from https://tc39.es/proposal-class-fields/.

@ljharb ljharb requested review from ljharb, zenparsing, littledan and tc39/ecma262-editors Aug 7, 2019

Show resolved Hide resolved spec.html
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">

This comment has been minimized.

Copy link
@ljharb

ljharb Aug 7, 2019

Member

should this commented clause be deleted, or uncommented?

Show resolved Hide resolved spec.html Outdated
Show resolved Hide resolved spec.html
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

@ljharb ljharb requested a review from waldemarhorwat Aug 7, 2019

@Ms2ger Ms2ger force-pushed the Ms2ger:class-fields branch from e27aca3 to c4ab316 Aug 8, 2019

@@ -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

This comment has been minimized.

Copy link
@ljharb

ljharb Aug 15, 2019

Member

this commented section should be uncommented or removed?

This comment has been minimized.

Copy link
@Ms2ger

Ms2ger Aug 15, 2019

Author Contributor

This still needs doing, yes. I'm holding off in case there's substantive comments that affect it.

Show resolved Hide resolved spec.html
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.

This comment has been minimized.

Copy link
@ljharb

ljharb Aug 15, 2019

Member

this last step seems kind of implied to me, can/should it be removed?

Show resolved Hide resolved spec.html

<emu-grammar>ClassElement : FieldDefinition `;`</emu-grammar>
<ul>
<li>It is a Syntax Error if PropName of |FieldDefinition| is `"constructor"`.</li>

This comment has been minimized.

Copy link
@ljharb

ljharb Aug 15, 2019

Member

@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>

This comment has been minimized.

Copy link
@ljharb

ljharb Aug 15, 2019

Member

this TODO seems like it needs doing?

This comment has been minimized.

Copy link
@Ms2ger

Ms2ger Aug 15, 2019

Author Contributor

Same: This still needs doing, yes. I'm holding off in case there's substantive comments that affect it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.