Skip to content

Commit

Permalink
Editorial: Rename alias _bindings_ to _bindingObject_
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdyck committed Jan 23, 2021
1 parent 5bb83c0 commit d31bf01
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8678,11 +8678,11 @@ <h1>Object Environment Records</h1>
<h1>HasBinding ( _N_ )</h1>
<p>The HasBinding concrete method of an object Environment Record _envRec_ takes argument _N_ (a String). It determines if its associated binding object has a property whose name is the value of the argument _N_. It performs the following steps when called:</p>
<emu-alg>
1. Let _bindings_ be _envRec_.[[BindingObject]].
1. Let _foundBinding_ be ? HasProperty(_bindings_, _N_).
1. Let _bindingObject_ be _envRec_.[[BindingObject]].
1. Let _foundBinding_ be ? HasProperty(_bindingObject_, _N_).
1. If _foundBinding_ is *false*, return *false*.
1. If _envRec_.[[WithEnvironmentFlag]] is *false*, return *true*.
1. Let _unscopables_ be ? Get(_bindings_, @@unscopables).
1. Let _unscopables_ be ? Get(_bindingObject_, @@unscopables).
1. If Type(_unscopables_) is Object, then
1. Let _blocked_ be ! ToBoolean(? Get(_unscopables_, _N_)).
1. If _blocked_ is *true*, return *false*.
Expand All @@ -8694,8 +8694,8 @@ <h1>HasBinding ( _N_ )</h1>
<h1>CreateMutableBinding ( _N_, _D_ )</h1>
<p>The CreateMutableBinding concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String) and _D_ (a Boolean). It creates in an Environment Record's associated binding object a property whose name is the String value and initializes it to the value *undefined*. If _D_ has the value *true*, the new property's [[Configurable]] attribute is set to *true*; otherwise it is set to *false*. It performs the following steps when called:</p>
<emu-alg>
1. Let _bindings_ be _envRec_.[[BindingObject]].
1. Return ? DefinePropertyOrThrow(_bindings_, _N_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _D_ }).
1. Let _bindingObject_ be _envRec_.[[BindingObject]].
1. Return ? DefinePropertyOrThrow(_bindingObject_, _N_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _D_ }).
</emu-alg>
<emu-note>
<p>Normally _envRec_ will not have a binding for _N_ but if it does, the semantics of DefinePropertyOrThrow may result in an existing binding being replaced or shadowed or cause an abrupt completion to be returned.</p>
Expand All @@ -8722,31 +8722,31 @@ <h1>InitializeBinding ( _N_, _V_ )</h1>
<h1>SetMutableBinding ( _N_, _V_, _S_ )</h1>
<p>The SetMutableBinding concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String), _V_ (an ECMAScript language value), and _S_ (a Boolean). It attempts to set the value of the Environment Record's associated binding object's property whose name is the value of the argument _N_ to the value of argument _V_. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_. It performs the following steps when called:</p>
<emu-alg>
1. Let _bindings_ be _envRec_.[[BindingObject]].
1. Let _stillExists_ be ? HasProperty(_bindings_, _N_).
1. Let _bindingObject_ be _envRec_.[[BindingObject]].
1. Let _stillExists_ be ? HasProperty(_bindingObject_, _N_).
1. If _stillExists_ is *false* and _S_ is *true*, throw a *ReferenceError* exception.
1. Return ? Set(_bindings_, _N_, _V_, _S_).
1. Return ? Set(_bindingObject_, _N_, _V_, _S_).
</emu-alg>
</emu-clause>

<emu-clause id="sec-object-environment-records-getbindingvalue-n-s">
<h1>GetBindingValue ( _N_, _S_ )</h1>
<p>The GetBindingValue concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It returns the value of its associated binding object's property whose name is the String value of the argument identifier _N_. The property should already exist but if it does not the result depends upon _S_. It performs the following steps when called:</p>
<emu-alg>
1. Let _bindings_ be _envRec_.[[BindingObject]].
1. Let _value_ be ? HasProperty(_bindings_, _N_).
1. Let _bindingObject_ be _envRec_.[[BindingObject]].
1. Let _value_ be ? HasProperty(_bindingObject_, _N_).
1. If _value_ is *false*, then
1. If _S_ is *false*, return the value *undefined*; otherwise throw a *ReferenceError* exception.
1. Return ? Get(_bindings_, _N_).
1. Return ? Get(_bindingObject_, _N_).
</emu-alg>
</emu-clause>

<emu-clause id="sec-object-environment-records-deletebinding-n">
<h1>DeleteBinding ( _N_ )</h1>
<p>The DeleteBinding concrete method of an object Environment Record _envRec_ takes argument _N_ (a String). It can only delete bindings that correspond to properties of the environment object whose [[Configurable]] attribute have the value *true*. It performs the following steps when called:</p>
<emu-alg>
1. Let _bindings_ be _envRec_.[[BindingObject]].
1. Return ? _bindings_.[[Delete]](_N_).
1. Let _bindingObject_ be _envRec_.[[BindingObject]].
1. Return ? _bindingObject_.[[Delete]](_N_).
</emu-alg>
</emu-clause>

Expand Down

0 comments on commit d31bf01

Please sign in to comment.