Skip to content

Commit a22576d

Browse files
Kevin SmithKevin Smith
Kevin Smith
authored and
Kevin Smith
committed
Comment out support for hidden methods in object literals
1 parent 2eff050 commit a22576d

File tree

3 files changed

+29
-5
lines changed

3 files changed

+29
-5
lines changed

src/runtime-semantics.html

+16-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ <h1>Runtime Semantics</h1>
33

44
<emu-clause id="sec-evaluation">
55
<h1>Evaluation</h1>
6+
7+
<!--
68
<emu-grammar>
79
ObjectLiteral : `{` PropertyDefinitionList `}`
810
ObjectLiteral : `{` PropertyDefinitionList `,` `}`
@@ -21,6 +23,7 @@ <h1>Evaluation</h1>
2123
1. <ins>Perform ! InitializeHiddenBindings(_hiddenDefinitions_, _hiddenEnv_).</ins>
2224
1. Return _obj_.
2325
</emu-alg>
26+
-->
2427

2528
<emu-grammar>
2629
SuperCall : `super` Arguments
@@ -106,6 +109,9 @@ <h1>[[Construct]] ( _argumentsList_, _newTarget_ )</h1>
106109

107110
<emu-clause id="sec-definemethod" aoid="DefineMethod">
108111
<h1>DefineMethod</h1>
112+
<emu-note type="editor">
113+
DefineMethod has been generalized to create methods for all method definition productions.
114+
</emu-note>
109115
<p>With parameter _homeObject_.</p>
110116

111117
<emu-grammar>
@@ -212,7 +218,10 @@ <h1>DefineMethod</h1>
212218
<emu-clause id="sec-property-definition-evaluation" aoid="PropertyDefinitionEvaluation">
213219
<h1>PropertyDefinitionEvaluation</h1>
214220
<emu-note type="editor">
215-
Hidden method definitions are evaluated separately in HiddenDefinitionEvaluation.
221+
PropertyDefinitionEvaluation of |MethodDefinition| productions has been refactored to use DefineMethod.
222+
</emu-note>
223+
<emu-note type="editor">
224+
PropertyDefinitionEvaluation does not process hidden definitions. Hidden method definitions are evaluated separately in HiddenDefinitionEvaluation.
216225
</emu-note>
217226
<p>With parameters _object_ and _enumerable_.</p>
218227

@@ -294,7 +303,12 @@ <h1>PropertyDefinitionEvaluation</h1>
294303

295304
<emu-clause id="sec-hidden-definition-evaluation" aoid="HiddenDefinitionEvaluation">
296305
<h1>HiddenDefinitionEvaluation</h1>
306+
<emu-note type="editor">
307+
HiddenDefinitionEvaluation evaluates hidden class elements and populates the specified _hiddenDefinitions_ List with HiddenMemberDescriptors.
308+
</emu-note>
297309
<p>With parameters _object_ and _hiddenDefinitions_.</p>
310+
311+
<!--
298312
<emu-grammar>
299313
PropertyDefinitionList : PropertyDefinitionList `,` PropertyDefinition
300314
</emu-grammar>
@@ -312,6 +326,7 @@ <h1>HiddenDefinitionEvaluation</h1>
312326
<emu-alg>
313327
1. Return.
314328
</emu-alg>
329+
-->
315330

316331
<emu-grammar>
317332
MethodDefinition : PropertyName `(` UniqueFormalParameters `)` `{` FunctionBody `}`

src/static-semantics.html

+7-3
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@ <h1>Early Errors</h1>
2222
</li>
2323
</ul>
2424

25+
<!--
2526
<emu-grammar>
2627
ObjectLiteral : `{` PropertyDefinitionList `}`
2728
ObjectLiteral : `{` PropertyDefinitionList `,` `}`
2829
</emu-grammar>
2930
<ul>
3031
<li><ins>It is a Syntax Error if HasDuplicateHiddenNames(|PropertyDefinitionList|) is *true*.</ins></li>
3132
</ul>
33+
-->
3234

3335
<emu-grammar>
3436
HiddenMethod : `hidden` MethodDefinition
@@ -153,9 +155,10 @@ <h1>MethodHasIdentifierName</h1>
153155
<emu-clause id="sec-hiddennames" aoid="HiddenNames">
154156
<h1>HiddenNames</h1>
155157
<emu-note type="editor">
156-
HiddenNames of a |PropertyDefinitionList| or |ClassElementList| returns a List containing all of the hidden member names defined in an object literal or class body. Each element in the list is a Record of the form {[[Name]]: *string*, [[Kind]]: *string*}.
158+
HiddenNames of a |ClassElementList| returns a List containing all of the hidden member names defined in the class body. Each element in the list is a Record of the form {[[Name]]: *string*, [[Kind]]: *string*}.
157159
</emu-note>
158160

161+
<!--
159162
<emu-grammar>
160163
PropertyDefinitionList : PropertyDefinitionList `,` PropertyDefinition
161164
</emu-grammar>
@@ -174,6 +177,7 @@ <h1>HiddenNames</h1>
174177
<emu-alg>
175178
1. Return a new empty List.
176179
</emu-alg>
180+
-->
177181

178182
<emu-grammar>
179183
MethodDefinition : PropertyName `(` UniqueFormalParameters `)` `{` FunctionBody `}`
@@ -249,10 +253,10 @@ <h1>HiddenNames</h1>
249253
<emu-clause id="sec-hasduplicatehiddennames" aoid="HasDuplicateHiddenNames">
250254
<h1>HasDuplicateHiddenNames ( _parseNode_ )</h1>
251255
<emu-note type="editor">
252-
HasDuplicateHiddenNames returns *true* if an object intializer or class body contains more than one definition for a single hidden name, and those definitions do not form an accessor method pair.
256+
HasDuplicateHiddenNames returns *true* if a class body contains more than one definition for a single hidden name, and those definitions do not form an accessor method pair.
253257
</emu-note>
254258
<emu-alg>
255-
1. Assert: _parseNode_ is |ClassElementList| or |PropertyDefintionList|.
259+
1. Assert: _parseNode_ is |ClassElementList|.
256260
1. Let _members_ be HiddenNames of _parseNode_.
257261
1. For each element _member_ of _members_, do
258262
1. For each element _otherMember_ of _members_, do

src/syntax.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
<emu-clause id="sec-syntax">
22
<h1>Syntax</h1>
3-
<emu-grammar>
43

4+
<!--
5+
<emu-grammar>
56
PropertyDefinition[Yield, Await] :
67
IdentifierReference[?Yield, ?Await]
78
CoverInitializedName[?Yield, ?Await]
89
PropertyName[?Yield, ?Await] `:` AssignmentExpression[+In, ?Yield, ?Await]
910
MethodDefinition[?Yield, ?Await]
1011
<ins>HiddenMethod[?Yield, ?Await]</ins>
12+
</emu-grammar>
13+
-->
14+
15+
<emu-grammar>
1116

1217
ClassElement[Yield, Await] :
1318
<ins>InstanceVariableDeclaration[?Yield, ?Await]</ins>

0 commit comments

Comments
 (0)