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.
10168
+
Satisfies the invariant that no two records in [[Bindings]] have the same [[BoundName]].
10169
10169
</td>
10170
10170
</tr>
10171
10171
</table>
10172
10172
</emu-table>
10173
+
10174
+
<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>
10175
+
10176
+
<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>
10187
10226
</dl>
10188
10227
<emu-alg>
10189
-
1. If _envRec_.[[Bindings]] contains a binding for the name that is the value of _N_, return *true*.
10228
+
1. If _envRec_.[[Bindings]] contains a DeclarativeBinding whose [[BoundName]] field is equal to the value of _N_, return *true*.
10190
10229
1. Return *false*.
10191
10230
</emu-alg>
10192
10231
</emu-clause>
@@ -10207,7 +10246,7 @@ <h1>
10207
10246
</dl>
10208
10247
<emu-alg>
10209
10248
1. Assert: _envRec_.HasBinding(_N_) is *false*.
10210
-
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.
10249
+
1. Let _binding_ be SimpleDeclarativeBinding { [[BoundName]]: _N_, [[BoundValue]]: ~uninitialized~, [[IsMutable]]: *true*, [[IsDeletable]]: _D_, [[IsStrict]]: *false* }.
10211
10250
1. Append _binding_ to _envRec_.[[Bindings]].
10212
10251
1. Return ~unused~.
10213
10252
</emu-alg>
@@ -10229,7 +10268,7 @@ <h1>
10229
10268
</dl>
10230
10269
<emu-alg>
10231
10270
1. Assert: _envRec_.HasBinding(_N_) is *false*.
10232
-
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.
10271
+
1. Let _binding_ be SimpleDeclarativeBinding { [[BoundName]]: _N_, [[BoundValue]]: ~uninitialized~, [[IsMutable]]: *false*, [[IsDeletable]]: *false*, [[IsStrict]]: _S_ }.
10233
10272
1. Append _binding_ to _envRec_.[[Bindings]].
10234
10273
1. Return ~unused~.
10235
10274
</emu-alg>
@@ -10251,10 +10290,10 @@ <h1>
10251
10290
</dl>
10252
10291
<emu-alg>
10253
10292
1. Assert: _envRec_.HasBinding(_N_) is *true*.
10254
-
1. Let _binding_ be the binding for _N_ in _envRec_.[[Bindings]].
10255
-
1. Assert: _binding_ is uninitialized.
10256
-
1. Set the bound value of _binding_ to _V_.
10257
-
1. <emu-not-ref>Record</emu-not-ref> that _binding_ has been initialized.
10293
+
1. Let _binding_ be the DeclarativeBinding in _envRec_.[[Bindings]] whose [[BoundName]] field equals _N_.
10294
+
1. Assert: _binding_ is a SimpleDeclarativeBinding.
10295
+
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.
11374
-
1. Return the value currently bound in _binding_.
11442
+
1. Assert: _binding_ is a SimpleDeclarativeBinding.
11443
+
1. If _binding_.[[BoundValue]] is ~uninitialized~, throw a *ReferenceError* exception.
11444
+
1. Return _binding_.[[BoundValue]].
11375
11445
</emu-alg>
11376
11446
<emu-note>
11377
11447
<p>_S_ will always be *true* because a |Module| is always strict mode code.</p>
@@ -11429,7 +11499,7 @@ <h1>
11429
11499
<emu-alg>
11430
11500
1. Assert: _envRec_.HasBinding(_N_) is *false*.
11431
11501
1. Assert: When _M_.[[Environment]] is instantiated it will have a direct binding for _N2_.
11432
-
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.
11502
+
1. Let _binding_ be ImportDeclarativeBinding { [[BoundName]]: _N_, [[TargetModuleRec]]: _M_, [[TargetName]]: _N2_ }.
11433
11503
1. Append _binding_ to _envRec_.[[Bindings]].
11434
11504
1. Return ~unused~.
11435
11505
</emu-alg>
@@ -47683,8 +47753,9 @@ <h1>Changes to BlockDeclarationInstantiation</h1>
47683
47753
<p>During BlockDeclarationInstantiation the following steps are performed in place of step <emu-xref href="#step-blockdeclarationinstantiation-initializebinding"></emu-xref>:</p>
0 commit comments