Skip to content

Commit

Permalink
Editorial: add preambles
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed May 7, 2021
1 parent 768cd93 commit 866d7de
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -3750,6 +3750,7 @@ <h1>IsSuperReference ( _V_ )</h1>

<emu-clause id="sec-isprivatereference" aoid="IsPrivateReference">
<h1>IsPrivateReference ( _V_ )</h1>
<p>The abstract operation IsPrivateReference takes argument _V_. It performs the following steps when called:</p>
<emu-alg>
1. Assert: _V_ is a Reference Record.
1. If _V_.[[ReferencedName]] is a Private Name, return *true*; otherwise return *false*.
Expand Down Expand Up @@ -3831,6 +3832,7 @@ <h1>InitializeReferencedBinding ( _V_, _W_ )</h1>

<emu-clause id="sec-makeprivatereference" aoid="MakePrivateReference">
<h1>MakePrivateReference ( _baseValue_, _privateIdentifier_ )</h1>
<p>The abstract operation MakePrivateReference takes arguments _baseValue_ (an ECMAScript language value) and _privateIdentifier_ (a String). It performs the following steps when called:</p>
<emu-alg>
1. Let _privEnv_ be the running execution context's PrivateEnvironment.
1. Assert: _privEnv_ is not *null*.
Expand Down Expand Up @@ -5747,6 +5749,7 @@ <h1>CopyDataProperties ( _target_, _source_, _excludedItems_ )</h1>

<emu-clause id="sec-newprivatename" aoid="NewPrivateName">
<h1>NewPrivateName ( _description_ )</h1>
<p>The abstract operation NewPrivateName takes argument _description_ (a String). It performs the following steps when called:</p>
<emu-alg>
1. Assert: Type(_description_) is String.
1. Return a new unique Private Name whose [[Description]] value is _description_.
Expand All @@ -5755,9 +5758,8 @@ <h1>NewPrivateName ( _description_ )</h1>

<emu-clause id="sec-privateelementfind" aoid="PrivateElementFind">
<h1>PrivateElementFind ( _P_, _O_ )</h1>
<p>The abstract operation PrivateElementFind takes arguments _P_ (a Private Name) and _O_ (an Object). It performs the following steps when called:</p>
<emu-alg>
1. Assert: _P_ is a Private Name.
1. Assert: Type(_O_) is Object.
1. For each PrivateElement Record _entry_ of _O_.[[PrivateElements]], do
1. If _entry_.[[Key]] is _P_, return _entry_.
1. Return ~empty~.
Expand All @@ -5766,9 +5768,8 @@ <h1>PrivateElementFind ( _P_, _O_ )</h1>

<emu-clause id="sec-privatefieldadd" aoid="PrivateFieldAdd">
<h1>PrivateFieldAdd ( _P_, _O_, _value_ )</h1>
<p>The abstract operation PrivateFieldAdd takes arguments _P_ (a Private Name), _O_ (an Object), and _value_ (an ECMAScript language value). It performs the following steps when called:</p>
<emu-alg>
1. Assert: _P_ is a Private Name.
1. Assert: Type(_O_) is Object.
1. Let _entry_ be ! PrivateElementFind(_P_, _O_).
1. If _entry_ is not ~empty~, throw a *TypeError* exception.
1. Append PrivateElement { [[Key]]: _P_, [[Kind]]: ~field~, [[Value]]: _value_ } to _O_.[[PrivateElements]].
Expand All @@ -5777,8 +5778,8 @@ <h1>PrivateFieldAdd ( _P_, _O_, _value_ )</h1>

<emu-clause id="sec-privatemethodadd" aoid="PrivateMethodAdd">
<h1>PrivateMethodAdd ( _method_, _O_ )</h1>
<p>The abstract operation PrivateMethodAdd takes arguments _method_ (a PrivateElement Record) and _O_ (an Object). It performs the following steps when called:</p>
<emu-alg>
1. Assert: _method_ is a PrivateElement Record.
1. Assert: _method_.[[Kind]] is either ~method~ or ~accessor~.
1. Let _entry_ be ! PrivateElementFind(_method_.[[Key]], _O_).
1. If _entry_ is not ~empty~, throw a *TypeError* exception.
Expand All @@ -5789,9 +5790,8 @@ <h1>PrivateMethodAdd ( _method_, _O_ )</h1>

<emu-clause id="sec-privateget" aoid="PrivateGet">
<h1>PrivateGet ( _P_, _O_ )</h1>
<p>The abstract operation PrivateGet takes arguments _P_ (a Private Name) and _O_ (an Object). It performs the following steps when called:</p>
<emu-alg>
1. Assert: _P_ is a Private Name.
1. Assert: Type(_O_) is Object.
1. Let _entry_ be ! PrivateElementFind(_P_, _O_).
1. If _entry_ is ~empty~, throw a *TypeError* exception.
1. If _entry_.[[Kind]] is ~field~ or ~method~, then
Expand All @@ -5805,9 +5805,8 @@ <h1>PrivateGet ( _P_, _O_ )</h1>

<emu-clause id="sec-privateset" aoid="PrivateSet">
<h1>PrivateSet ( _P_, _O_, _value_ )</h1>
<p>The abstract operation PrivateSet takes arguments _P_ (a Private Name), _O_ (an Object), and _value_ (an ECMAScript language value). It performs the following steps when called:</p>
<emu-alg>
1. Assert: _P_ is a Private Name.
1. Assert: Type(_O_) is Object.
1. Let _entry_ be ! PrivateElementFind(_P_, _O_).
1. If _entry_ is ~empty~, throw a *TypeError* exception.
1. If _entry_.[[Kind]] is ~field~, then
Expand All @@ -5823,9 +5822,8 @@ <h1>PrivateSet ( _P_, _O_, _value_ )</h1>

<emu-clause id="sec-definefield" aoid="DefineField">
<h1>DefineField ( _receiver_, _fieldRecord_ )</h1>
<p>The abstract operation DefineField takes arguments _receiver_ (an Object) and _fieldRecord_ (a ClassFieldDefinition Record). It performs the following steps when called:</p>
<emu-alg>
1. Assert: Type(_receiver_) is Object.
1. Assert: _fieldRecord_ is a ClassFieldDefinition Record.
1. Let _fieldName_ be _fieldRecord_.[[Name]].
1. Let _initializer_ be _fieldRecord_.[[Initializer]].
1. If _initializer_ is not ~empty~, then
Expand All @@ -5841,9 +5839,8 @@ <h1>DefineField ( _receiver_, _fieldRecord_ )</h1>

<emu-clause id="sec-initializeinstanceelements" aoid="InitializeInstanceElements">
<h1>InitializeInstanceElements ( _O_, _constructor_ )</h1>
<p>The abstract operation InitializeInstanceElements takes arguments _O_ (an Object) and _constructor_ (an ECMAScript function object). It performs the following steps when called:</p>
<emu-alg>
1. Assert: Type(_O_) is Object.
1. Assert: _constructor_ is an ECMAScript function object.
1. Let _methods_ be the value of _constructor_.[[PrivateMethods]].
1. For each PrivateElement Record _method_ of _constructor_.[[PrivateMethods]], do
1. Perform ? PrivateMethodAdd(_method_, _O_).
Expand Down Expand Up @@ -11449,6 +11446,7 @@ <h1>MakeMethod ( _F_, _homeObject_ )</h1>

<emu-clause id="sec-definemethodproperty" aoid="DefineMethodProperty">
<h1>DefineMethodProperty ( _key_, _homeObject_, _closure_, _enumerable_ )</h1>
<p>The abstract operation DefineMethodProperty takes arguments _key_ (a property key or Private Name), _homeObject_ (an Object), _closure_ (a function object), and _enumerable_ (a Boolean). It performs the following steps when called:</p>
<emu-alg>
1. Perform SetFunctionName(_closure_, _key_).
1. If _key_ is a Private Name, then
Expand Down

0 comments on commit 866d7de

Please sign in to comment.