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.
10870
10870
</td>
10871
10871
</tr>
10872
-
<tr>
10873
-
<td>
10874
-
[[VarNames]]
10875
-
</td>
10876
-
<td>
10877
-
a List of Strings
10878
-
</td>
10879
-
<td>
10880
-
The string names bound by |FunctionDeclaration|, |GeneratorDeclaration|, |AsyncFunctionDeclaration|, |AsyncGeneratorDeclaration|, and |VariableDeclaration| declarations in global code for the associated realm.
10881
-
</td>
10882
-
</tr>
10883
10872
</table>
10884
10873
</emu-table>
10885
10874
<emu-table id="table-additional-methods-of-global-environment-records" caption="Additional Methods of Global Environment Records" oldids="table-19">
Return the value of this Environment Record's `this` binding.
10903
10892
</td>
10904
10893
</tr>
10905
-
<tr>
10906
-
<td>
10907
-
HasVarDeclaration (N)
10908
-
</td>
10909
-
<td>
10910
-
Determines if the argument identifier has a binding in this Environment Record that was created using a |VariableDeclaration|, |FunctionDeclaration|, |GeneratorDeclaration|, |AsyncFunctionDeclaration|, or |AsyncGeneratorDeclaration|.
10911
-
</td>
10912
-
</tr>
10913
10894
<tr>
10914
10895
<td>
10915
10896
HasLexicalDeclaration (N)
@@ -11117,10 +11098,7 @@ <h1>
11117
11098
1. Let _globalObject_ be _ObjRec_.[[BindingObject]].
11118
11099
1. Let _existingProp_ be ? HasOwnProperty(_globalObject_, _N_).
11119
11100
1. If _existingProp_ is *true*, then
11120
-
1. Let _status_ be ? <emu-meta effects="user-code">_ObjRec_.DeleteBinding</emu-meta>(_N_).
11121
-
1. If _status_ is *true* and _envRec_.[[VarNames]] contains _N_, then
<dd>It determines if the argument identifier has a binding in this record that was created using a |VariableStatement| or a |FunctionDeclaration|.</dd>
11190
-
</dl>
11191
-
<emu-alg>
11192
-
1. Let _varDeclaredNames_ be _envRec_.[[VarNames]].
11193
-
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>
11259
+
<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>
11302
11260
</dl>
11303
11261
<emu-alg>
11304
11262
1. Let _ObjRec_ be _envRec_.[[ObjectRecord]].
@@ -11308,8 +11266,6 @@ <h1>
11308
11266
1. If _hasProperty_ is *false* and _extensible_ is *true*, then
1. If _envRec_.[[VarNames]] does not contain _N_, then
11312
-
1. Append _N_ to _envRec_.[[VarNames]].
11313
11269
1. Return ~unused~.
11314
11270
</emu-alg>
11315
11271
</emu-clause>
@@ -11327,7 +11283,7 @@ <h1>
11327
11283
<dd>a Global Environment Record _envRec_</dd>
11328
11284
11329
11285
<dt>description</dt>
11330
-
<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>
11286
+
<dd>It creates and initializes a mutable binding in the associated Object Environment Record. If a binding already exists, it is replaced.</dd>
11331
11287
</dl>
11332
11288
<emu-alg>
11333
11289
1. Let _ObjRec_ be _envRec_.[[ObjectRecord]].
@@ -11339,8 +11295,6 @@ <h1>
11339
11295
1. Let _desc_ be the PropertyDescriptor { [[Value]]: _V_ }.
1. If _envRec_.[[VarNames]] does not contain _N_, then
11343
-
1. Append _N_ to _envRec_.[[VarNames]].
11344
11298
1. Return ~unused~.
11345
11299
</emu-alg>
11346
11300
<emu-note>
@@ -11569,7 +11523,6 @@ <h1>
11569
11523
1. Set _env_.[[ObjectRecord]] to _objRec_.
11570
11524
1. Set _env_.[[GlobalThisValue]] to _thisValue_.
11571
11525
1. Set _env_.[[DeclarativeRecord]] to _dclRec_.
11572
-
1. Set _env_.[[VarNames]] to a new empty List.
11573
11526
1. Set _env_.[[OuterEnv]] to *null*.
11574
11527
1. Return _env_.
11575
11528
</emu-alg>
@@ -26156,9 +26109,9 @@ <h1>
26156
26109
1. Let _lexNames_ be the LexicallyDeclaredNames of _script_.
26157
26110
1. Let _varNames_ be the VarDeclaredNames of _script_.
26158
26111
1. For each element _name_ of _lexNames_, do
26159
-
1. If _env_.HasVarDeclaration(_name_) is *true*, throw a *SyntaxError* exception.
26160
26112
1. If _env_.HasLexicalDeclaration(_name_) is *true*, throw a *SyntaxError* exception.
26161
26113
1. Let _hasRestrictedGlobal_ be ? _env_.HasRestrictedGlobalProperty(_name_).
26114
+
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.
26162
26115
1. If _hasRestrictedGlobal_ is *true*, throw a *SyntaxError* exception.
26163
26116
1. For each element _name_ of _varNames_, do
26164
26117
1. If _env_.HasLexicalDeclaration(_name_) is *true*, throw a *SyntaxError* exception.
0 commit comments