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.
10012
+
Satisfies the invariant that no two records in [[Bindings]] have the same [[BoundName]].
10013
10013
</td>
10014
10014
</tr>
10015
10015
</table>
10016
10016
</emu-table>
10017
+
10018
+
<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>
10019
+
10020
+
<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>
10031
10070
</dl>
10032
10071
<emu-alg>
10033
-
1. If _envRec_.[[Bindings]] contains a binding for _N_, return *true*.
10072
+
1. If _envRec_.[[Bindings]] contains a DeclarativeBinding whose [[BoundName]] field equals _N_, return *true*.
10034
10073
1. Return *false*.
10035
10074
</emu-alg>
10036
10075
</emu-clause>
@@ -10051,7 +10090,7 @@ <h1>
10051
10090
</dl>
10052
10091
<emu-alg>
10053
10092
1. Assert: _envRec_.HasBinding(_N_) is *false*.
10054
-
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.
10093
+
1. Let _binding_ be SimpleDeclarativeBinding { [[BoundName]]: _N_, [[BoundValue]]: ~uninitialized~, [[IsMutable]]: *true*, [[IsDeletable]]: _D_, [[IsStrict]]: *false* }.
10055
10094
1. Append _binding_ to _envRec_.[[Bindings]].
10056
10095
1. Return ~unused~.
10057
10096
</emu-alg>
@@ -10073,7 +10112,7 @@ <h1>
10073
10112
</dl>
10074
10113
<emu-alg>
10075
10114
1. Assert: _envRec_.HasBinding(_N_) is *false*.
10076
-
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.
10115
+
1. Let _binding_ be SimpleDeclarativeBinding { [[BoundName]]: _N_, [[BoundValue]]: ~uninitialized~, [[IsMutable]]: *false*, [[IsDeletable]]: *false*, [[IsStrict]]: _S_ }.
10077
10116
1. Append _binding_ to _envRec_.[[Bindings]].
10078
10117
1. Return ~unused~.
10079
10118
</emu-alg>
@@ -10095,10 +10134,10 @@ <h1>
10095
10134
</dl>
10096
10135
<emu-alg>
10097
10136
1. Assert: _envRec_.HasBinding(_N_) is *true*.
10098
-
1. Let _binding_ be the binding for _N_ in _envRec_.[[Bindings]].
10099
-
1. Assert: _binding_ is uninitialized.
10100
-
1. Set the bound value of _binding_ to _V_.
10101
-
1. <emu-not-ref>Record</emu-not-ref> that _binding_ has been initialized.
10137
+
1. Let _binding_ be the DeclarativeBinding in _envRec_.[[Bindings]] whose [[BoundName]] field equals _N_.
10138
+
1. Assert: _binding_ is a SimpleDeclarativeBinding.
10139
+
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.
11217
-
1. Return the value currently bound in _binding_.
11285
+
1. Assert: _binding_ is a SimpleDeclarativeBinding.
11286
+
1. If _binding_.[[BoundValue]] is ~uninitialized~, throw a *ReferenceError* exception.
11287
+
1. Return _binding_.[[BoundValue]].
11218
11288
</emu-alg>
11219
11289
<emu-note>
11220
11290
<p>_S_ will always be *true* because a |Module| is always strict mode code.</p>
@@ -11272,7 +11342,7 @@ <h1>
11272
11342
<emu-alg>
11273
11343
1. Assert: _envRec_.HasBinding(_N_) is *false*.
11274
11344
1. Assert: When _M_.[[Environment]] is instantiated, it will have a direct binding for _N2_.
11275
-
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.
11345
+
1. Let _binding_ be ImportDeclarativeBinding { [[BoundName]]: _N_, [[TargetModuleRec]]: _M_, [[TargetName]]: _N2_ }.
11276
11346
1. Append _binding_ to _envRec_.[[Bindings]].
11277
11347
1. Return ~unused~.
11278
11348
</emu-alg>
@@ -49889,8 +49959,9 @@ <h1>Changes to BlockDeclarationInstantiation</h1>
49889
49959
<p>During BlockDeclarationInstantiation the following steps are performed in place of step <emu-xref href="#step-blockdeclarationinstantiation-initializebinding"></emu-xref>:</p>
0 commit comments