You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Satisfies the invariant that no two bindings in [[Bindings]] are bindings for the same name.
10014
+
Satisfies the invariant that no two records in [[Bindings]] have the same [[BoundName]].
10015
10015
</td>
10016
10016
</tr>
10017
10017
</table>
10018
10018
</emu-table>
10019
+
10020
+
<p>A <dfn>DeclarativeBinding</dfn> is either a SimpleDeclarativeBinding or an ImportDeclarativeBinding. SimpleDeclarativeBindings can appear in any Declarative Environment Record, but ImportDeclarativeBindings can only appear in a Module Environment Record.</p>
10021
+
10022
+
<p>A <dfn>SimpleDeclarativeBinding</dfn> has the following fields:</p>
<dd>It determines if the argument identifier is one of the identifiers bound by the record.</dd>
10033
10072
</dl>
10034
10073
<emu-alg>
10035
-
1. If _envRec_.[[Bindings]] contains a binding for _N_, return *true*.
10074
+
1. If _envRec_.[[Bindings]] contains a DeclarativeBinding whose [[BoundName]] field equals _N_, return *true*.
10036
10075
1. Return *false*.
10037
10076
</emu-alg>
10038
10077
</emu-clause>
@@ -10053,7 +10092,7 @@ <h1>
10053
10092
</dl>
10054
10093
<emu-alg>
10055
10094
1. Assert: _envRec_.HasBinding(_N_) is *false*.
10056
-
1. Let _binding_ be a mutable binding for _N_ and record that it is uninitialized. If _D_ is *true*, record that the newly created binding may be deleted by a subsequent DeleteBinding call.
10095
+
1. Let _binding_ be SimpleDeclarativeBinding { [[BoundName]]: _N_, [[BoundValue]]: ~uninitialized~, [[IsMutable]]: *true*, [[IsDeletable]]: _D_, [[IsStrict]]: *false* }.
10057
10096
1. Append _binding_ to _envRec_.[[Bindings]].
10058
10097
1. Return ~unused~.
10059
10098
</emu-alg>
@@ -10075,7 +10114,7 @@ <h1>
10075
10114
</dl>
10076
10115
<emu-alg>
10077
10116
1. Assert: _envRec_.HasBinding(_N_) is *false*.
10078
-
1. Let _binding_ be an immutable binding for _N_ and record that it is uninitialized. If _S_ is *true*, record that the newly created binding is a strict binding.
10117
+
1. Let _binding_ be SimpleDeclarativeBinding { [[BoundName]]: _N_, [[BoundValue]]: ~uninitialized~, [[IsMutable]]: *false*, [[IsDeletable]]: *false*, [[IsStrict]]: _S_ }.
10079
10118
1. Append _binding_ to _envRec_.[[Bindings]].
10080
10119
1. Return ~unused~.
10081
10120
</emu-alg>
@@ -10097,10 +10136,10 @@ <h1>
10097
10136
</dl>
10098
10137
<emu-alg>
10099
10138
1. Assert: _envRec_.HasBinding(_N_) is *true*.
10100
-
1. Let _binding_ be the binding for _N_ in _envRec_.[[Bindings]].
10101
-
1. Assert: _binding_ is uninitialized.
10102
-
1. Set the bound value of _binding_ to _V_.
10103
-
1. <emu-not-ref>Record</emu-not-ref> that _binding_ has been initialized.
10139
+
1. Let _binding_ be the DeclarativeBinding in _envRec_.[[Bindings]] whose [[BoundName]] field equals _N_.
10140
+
1. Assert: _binding_ is a SimpleDeclarativeBinding.
10141
+
1. Assert: _binding_.[[BoundValue]] is ~uninitialized~.
<p>The [[Bindings]] of a Module Environment Record can include both SimpleDeclarativeBindings and ImportDeclarativeBindings. An <dfn>ImportDeclarativeBinding</dfn> has the following fields:</p>
1. If _binding_ is an uninitialized binding, throw a *ReferenceError* exception.
11219
-
1. Return the value currently bound in _binding_.
11287
+
1. Assert: _binding_ is a SimpleDeclarativeBinding.
11288
+
1. If _binding_.[[BoundValue]] is ~uninitialized~, throw a *ReferenceError* exception.
11289
+
1. Return _binding_.[[BoundValue]].
11220
11290
</emu-alg>
11221
11291
<emu-note>
11222
11292
<p>_S_ will always be *true* because a |Module| is always strict mode code.</p>
@@ -11274,7 +11344,7 @@ <h1>
11274
11344
<emu-alg>
11275
11345
1. Assert: _envRec_.HasBinding(_N_) is *false*.
11276
11346
1. Assert: When _M_.[[Environment]] is instantiated, it will have a direct binding for _N2_.
11277
-
1. Let _binding_ be an immutable indirect binding for _N_ that references _M_ and _N2_ as its target binding and record that the binding is initialized.
11347
+
1. Let _binding_ be ImportDeclarativeBinding { [[BoundName]]: _N_, [[TargetModuleRec]]: _M_, [[TargetName]]: _N2_ }.
11278
11348
1. Append _binding_ to _envRec_.[[Bindings]].
11279
11349
1. Return ~unused~.
11280
11350
</emu-alg>
@@ -48639,8 +48709,9 @@ <h1>Changes to BlockDeclarationInstantiation</h1>
48639
48709
<p>During BlockDeclarationInstantiation the following steps are performed in place of step <emu-xref href="#step-blockdeclarationinstantiation-initializebinding"></emu-xref>:</p>
0 commit comments