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
<emu-not-ref>Contains</emu-not-ref> bindings for all declarations in global code for the associated realm code except for |FunctionDeclaration|, |GeneratorDeclaration|, |AsyncFunctionDeclaration|, |AsyncGeneratorDeclaration|, and |VariableDeclaration| bindings.
10863
10863
</td>
10864
10864
</tr>
10865
-
<tr>
10866
-
<td>
10867
-
[[VarNames]]
10868
-
</td>
10869
-
<td>
10870
-
a List of Strings
10871
-
</td>
10872
-
<td>
10873
-
The string names bound by |FunctionDeclaration|, |GeneratorDeclaration|, |AsyncFunctionDeclaration|, |AsyncGeneratorDeclaration|, and |VariableDeclaration| declarations in global code for the associated realm.
10874
-
</td>
10875
-
</tr>
10876
10865
</table>
10877
10866
</emu-table>
10878
10867
<emu-table id="table-additional-methods-of-global-environment-records" caption="Additional Methods of Global Environment Records" oldids="table-19">
@@ -11053,10 +11042,7 @@ <h1>
11053
11042
1. Let _globalObject_ be _ObjRec_.[[BindingObject]].
11054
11043
1. Let _existingProp_ be ? HasOwnProperty(_globalObject_, _N_).
11055
11044
1. If _existingProp_ is *true*, then
11056
-
1. Let _status_ be ? <emu-meta effects="user-code">_ObjRec_.DeleteBinding</emu-meta>(_N_).
11057
-
1. If _status_ is *true* and _envRec_.[[VarNames]] contains _N_, then
<dd>It determines if the argument identifier has a binding in _envRec_ that was created using a |VariableDeclaration|, |FunctionDeclaration|, |GeneratorDeclaration|, |AsyncFunctionDeclaration|, or |AsyncGeneratorDeclaration|.</dd>
11124
-
</dl>
11125
-
<emu-alg>
11126
-
1. Let _varDeclaredNames_ be _envRec_.[[VarNames]].
11127
-
1. If _varDeclaredNames_ contains _N_, return *true*.
<dd>It creates and initializes a mutable binding in the associated Object Environment Record and records the bound name in the associated [[VarNames]] List. If a binding already exists, it is reused and assumed to be initialized.</dd>
11193
+
<dd>It creates and initializes a mutable binding in the associated Object Environment Record. If a binding already exists, it is reused and assumed to be initialized.</dd>
11226
11194
</dl>
11227
11195
<emu-alg>
11228
11196
1. Let _ObjRec_ be _envRec_.[[ObjectRecord]].
@@ -11232,8 +11200,6 @@ <h1>
11232
11200
1. If _hasProperty_ is *false* and _extensible_ is *true*, then
1. If _envRec_.[[VarNames]] does not contain _N_, then
11236
-
1. Append _N_ to _envRec_.[[VarNames]].
11237
11203
1. Return ~unused~.
11238
11204
</emu-alg>
11239
11205
</emu-clause>
@@ -11249,7 +11215,7 @@ <h1>
11249
11215
</h1>
11250
11216
<dl class="header">
11251
11217
<dt>description</dt>
11252
-
<dd>It creates and initializes a mutable binding in the associated Object Environment Record and records the bound name in the associated [[VarNames]] List. If a binding already exists, it is replaced.</dd>
11218
+
<dd>It creates and initializes a mutable binding in the associated Object Environment Record. If a binding already exists, it is replaced.</dd>
11253
11219
</dl>
11254
11220
<emu-alg>
11255
11221
1. Let _ObjRec_ be _envRec_.[[ObjectRecord]].
@@ -11261,8 +11227,6 @@ <h1>
11261
11227
1. Let _desc_ be the PropertyDescriptor { [[Value]]: _V_ }.
1. If _envRec_.[[VarNames]] does not contain _N_, then
11265
-
1. Append _N_ to _envRec_.[[VarNames]].
11266
11230
1. Return ~unused~.
11267
11231
</emu-alg>
11268
11232
<emu-note>
@@ -11480,7 +11444,6 @@ <h1>
11480
11444
1. Set _env_.[[ObjectRecord]] to _objRec_.
11481
11445
1. Set _env_.[[GlobalThisValue]] to _thisValue_.
11482
11446
1. Set _env_.[[DeclarativeRecord]] to _dclRec_.
11483
-
1. Set _env_.[[VarNames]] to a new empty List.
11484
11447
1. Set _env_.[[OuterEnv]] to *null*.
11485
11448
1. Return _env_.
11486
11449
</emu-alg>
@@ -26119,9 +26082,9 @@ <h1>
26119
26082
1. Let _lexNames_ be the LexicallyDeclaredNames of _script_.
26120
26083
1. Let _varNames_ be the VarDeclaredNames of _script_.
26121
26084
1. For each element _name_ of _lexNames_, do
26122
-
1. If HasVarDeclaration(_env_, _name_) is *true*, throw a *SyntaxError* exception.
26123
26085
1. If HasLexicalDeclaration(_env_, _name_) is *true*, throw a *SyntaxError* exception.
26124
26086
1. Let _hasRestrictedGlobal_ be ? HasRestrictedGlobalProperty(_env_, _name_).
26087
+
1. NOTE: Global `var` and `function` bindings (except those that are introduced by non-strict direct eval) are non-configurable and are therefore restricted global properties.
26125
26088
1. If _hasRestrictedGlobal_ is *true*, throw a *SyntaxError* exception.
26126
26089
1. For each element _name_ of _varNames_, do
26127
26090
1. If HasLexicalDeclaration(_env_, _name_) is *true*, throw a *SyntaxError* exception.
0 commit comments