diff --git a/spec.html b/spec.html index 2accf00f198..ff80fd8b6d5 100644 --- a/spec.html +++ b/spec.html @@ -5932,9 +5932,8 @@

Declarative Environment Records

HasBinding ( _N_ )

-

The concrete Environment Record method HasBinding for declarative Environment Records simply determines if the argument identifier is one of the identifiers bound by the record:

+

The HasBinding concrete method of a declarative Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier is one of the identifiers bound by the record. It performs the following steps when called:

- 1. Let _envRec_ be the declarative Environment Record for which the method was invoked. 1. If _envRec_ has a binding for the name that is the value of _N_, return *true*. 1. Return *false*. @@ -5942,9 +5941,8 @@

HasBinding ( _N_ )

CreateMutableBinding ( _N_, _D_ )

-

The concrete Environment Record method CreateMutableBinding for declarative Environment Records creates a new mutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If Boolean argument _D_ has the value *true* the new binding is marked as being subject to deletion.

+

The CreateMutableBinding concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String) and _D_ (a Boolean). It creates a new mutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _D_ has the value *true*, the new binding is marked as being subject to deletion. It performs the following steps when called:

- 1. Let _envRec_ be the declarative Environment Record for which the method was invoked. 1. Assert: _envRec_ does not already have a binding for _N_. 1. Create a mutable binding in _envRec_ 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. 1. Return NormalCompletion(~empty~). @@ -5953,9 +5951,8 @@

CreateMutableBinding ( _N_, _D_ )

CreateImmutableBinding ( _N_, _S_ )

-

The concrete Environment Record method CreateImmutableBinding for declarative Environment Records creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If the Boolean argument _S_ has the value *true* the new binding is marked as a strict binding.

+

The CreateImmutableBinding concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _S_ has the value *true*, the new binding is marked as a strict binding. It performs the following steps when called:

- 1. Let _envRec_ be the declarative Environment Record for which the method was invoked. 1. Assert: _envRec_ does not already have a binding for _N_. 1. Create an immutable binding in _envRec_ for _N_ and record that it is uninitialized. If _S_ is *true*, record that the newly created binding is a strict binding. 1. Return NormalCompletion(~empty~). @@ -5964,9 +5961,8 @@

CreateImmutableBinding ( _N_, _S_ )

InitializeBinding ( _N_, _V_ )

-

The concrete Environment Record method InitializeBinding for declarative Environment Records is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. An uninitialized binding for _N_ must already exist.

+

The InitializeBinding concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String) and _V_ (an ECMAScript language value). It is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. An uninitialized binding for _N_ must already exist. It performs the following steps when called:

- 1. Let _envRec_ be the declarative Environment Record for which the method was invoked. 1. Assert: _envRec_ must have an uninitialized binding for _N_. 1. Set the bound value for _N_ in _envRec_ to _V_. 1. Record that the binding for _N_ in _envRec_ has been initialized. @@ -5976,9 +5972,8 @@

InitializeBinding ( _N_, _V_ )

SetMutableBinding ( _N_, _V_, _S_ )

-

The concrete Environment Record method SetMutableBinding for declarative Environment Records attempts to change the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. A binding for _N_ normally already exists, but in rare cases it may not. If the binding is an immutable binding, a *TypeError* is thrown if _S_ is *true*.

+

The SetMutableBinding concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String), _V_ (an ECMAScript language value), and _S_ (a Boolean). It attempts to change the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. A binding for _N_ normally already exists, but in rare cases it may not. If the binding is an immutable binding, a *TypeError* is thrown if _S_ is *true*. It performs the following steps when called:

- 1. Let _envRec_ be the declarative Environment Record for which the method was invoked. 1. [id="step-setmutablebinding-missing-binding"] If _envRec_ does not have a binding for _N_, then 1. If _S_ is *true*, throw a *ReferenceError* exception. 1. Perform _envRec_.CreateMutableBinding(_N_, *true*). @@ -6000,9 +5995,8 @@

SetMutableBinding ( _N_, _V_, _S_ )

GetBindingValue ( _N_, _S_ )

-

The concrete Environment Record method GetBindingValue for declarative Environment Records simply returns the value of its bound identifier whose name is the value of the argument _N_. If the binding exists but is uninitialized a *ReferenceError* is thrown, regardless of the value of _S_.

+

The GetBindingValue concrete method of a declarative Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It returns the value of its bound identifier whose name is the value of the argument _N_. If the binding exists but is uninitialized a *ReferenceError* is thrown, regardless of the value of _S_. It performs the following steps when called:

- 1. Let _envRec_ be the declarative Environment Record for which the method was invoked. 1. Assert: _envRec_ has a binding for _N_. 1. If the binding for _N_ in _envRec_ is an uninitialized binding, throw a *ReferenceError* exception. 1. Return the value currently bound to _N_ in _envRec_. @@ -6011,9 +6005,8 @@

GetBindingValue ( _N_, _S_ )

DeleteBinding ( _N_ )

-

The concrete Environment Record method DeleteBinding for declarative Environment Records can only delete bindings that have been explicitly designated as being subject to deletion.

+

The DeleteBinding concrete method of a declarative Environment Record _envRec_ takes argument _N_ (a String). It can only delete bindings that have been explicitly designated as being subject to deletion. It performs the following steps when called:

- 1. Let _envRec_ be the declarative Environment Record for which the method was invoked. 1. Assert: _envRec_ has a binding for the name that is the value of _N_. 1. If the binding for _N_ in _envRec_ cannot be deleted, return *false*. 1. Remove the binding for _N_ from _envRec_. @@ -6023,23 +6016,29 @@

DeleteBinding ( _N_ )

HasThisBinding ( )

-

Regular declarative Environment Records do not provide a `this` binding.

+

The HasThisBinding concrete method of a declarative Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *false*. + +

A regular declarative Environment Record (i.e., one that is neither a function Environment Record nor a module Environment Record) does not provide a `this` binding.

+

HasSuperBinding ( )

-

Regular declarative Environment Records do not provide a `super` binding.

+

The HasSuperBinding concrete method of a declarative Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *false*. + +

A regular declarative Environment Record (i.e., one that is neither a function Environment Record nor a module Environment Record) does not provide a `super` binding.

+

WithBaseObject ( )

-

Declarative Environment Records always return *undefined* as their WithBaseObject.

+

The WithBaseObject concrete method of a declarative Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *undefined*. @@ -6054,9 +6053,8 @@

Object Environment Records

HasBinding ( _N_ )

-

The concrete Environment Record method HasBinding for object Environment Records determines if its associated binding object has a property whose name is the value of the argument _N_:

+

The HasBinding concrete method of an object Environment Record _envRec_ takes argument _N_ (a String). It determines if its associated binding object has a property whose name is the value of the argument _N_. It performs the following steps when called:

- 1. Let _envRec_ be the object Environment Record for which the method was invoked. 1. Let _bindings_ be the binding object for _envRec_. 1. Let _foundBinding_ be ? HasProperty(_bindings_, _N_). 1. If _foundBinding_ is *false*, return *false*. @@ -6071,9 +6069,8 @@

HasBinding ( _N_ )

CreateMutableBinding ( _N_, _D_ )

-

The concrete Environment Record method CreateMutableBinding for object Environment Records creates in an Environment Record's associated binding object a property whose name is the String value and initializes it to the value *undefined*. If Boolean argument _D_ has the value *true* the new property's [[Configurable]] attribute is set to *true*; otherwise it is set to *false*.

+

The CreateMutableBinding concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String) and _D_ (a Boolean). It creates in an Environment Record's associated binding object a property whose name is the String value and initializes it to the value *undefined*. If _D_ has the value *true*, the new property's [[Configurable]] attribute is set to *true*; otherwise it is set to *false*. It performs the following steps when called:

- 1. Let _envRec_ be the object Environment Record for which the method was invoked. 1. Let _bindings_ be the binding object for _envRec_. 1. Return ? DefinePropertyOrThrow(_bindings_, _N_, PropertyDescriptor { [[Value]]: *undefined*, [[Writable]]: *true*, [[Enumerable]]: *true*, [[Configurable]]: _D_ }). @@ -6084,14 +6081,13 @@

CreateMutableBinding ( _N_, _D_ )

CreateImmutableBinding ( _N_, _S_ )

-

The concrete Environment Record method CreateImmutableBinding is never used within this specification in association with object Environment Records.

+

The CreateImmutableBinding concrete method of an object Environment Record is never used within this specification.

InitializeBinding ( _N_, _V_ )

-

The concrete Environment Record method InitializeBinding for object Environment Records is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_.

+

The InitializeBinding concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String) and _V_ (an ECMAScript language value). It is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. It performs the following steps when called:

- 1. Let _envRec_ be the object Environment Record for which the method was invoked. 1. Return ? _envRec_.SetMutableBinding(_N_, _V_, *false*). @@ -6101,9 +6097,8 @@

InitializeBinding ( _N_, _V_ )

SetMutableBinding ( _N_, _V_, _S_ )

-

The concrete Environment Record method SetMutableBinding for object Environment Records attempts to set the value of the Environment Record's associated binding object's property whose name is the value of the argument _N_ to the value of argument _V_. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by the value of the Boolean argument _S_.

+

The SetMutableBinding concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String), _V_ (an ECMAScript language value), and _S_ (a Boolean). It attempts to set the value of the Environment Record's associated binding object's property whose name is the value of the argument _N_ to the value of argument _V_. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_. It performs the following steps when called:

- 1. Let _envRec_ be the object Environment Record for which the method was invoked. 1. Let _bindings_ be the binding object for _envRec_. 1. Let _stillExists_ be ? HasProperty(_bindings_, _N_). 1. If _stillExists_ is *false* and _S_ is *true*, throw a *ReferenceError* exception. @@ -6113,9 +6108,8 @@

SetMutableBinding ( _N_, _V_, _S_ )

GetBindingValue ( _N_, _S_ )

-

The concrete Environment Record method GetBindingValue for object Environment Records returns the value of its associated binding object's property whose name is the String value of the argument identifier _N_. The property should already exist but if it does not the result depends upon the value of the _S_ argument:

+

The GetBindingValue concrete method of an object Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It returns the value of its associated binding object's property whose name is the String value of the argument identifier _N_. The property should already exist but if it does not the result depends upon _S_. It performs the following steps when called:

- 1. Let _envRec_ be the object Environment Record for which the method was invoked. 1. Let _bindings_ be the binding object for _envRec_. 1. Let _value_ be ? HasProperty(_bindings_, _N_). 1. If _value_ is *false*, then @@ -6126,9 +6120,8 @@

GetBindingValue ( _N_, _S_ )

DeleteBinding ( _N_ )

-

The concrete Environment Record method DeleteBinding for object Environment Records can only delete bindings that correspond to properties of the environment object whose [[Configurable]] attribute have the value *true*.

+

The DeleteBinding concrete method of an object Environment Record _envRec_ takes argument _N_ (a String). It can only delete bindings that correspond to properties of the environment object whose [[Configurable]] attribute have the value *true*. It performs the following steps when called:

- 1. Let _envRec_ be the object Environment Record for which the method was invoked. 1. Let _bindings_ be the binding object for _envRec_. 1. Return ? _bindings_.[[Delete]](_N_). @@ -6136,25 +6129,30 @@

DeleteBinding ( _N_ )

HasThisBinding ( )

-

Regular object Environment Records do not provide a `this` binding.

+

The HasThisBinding concrete method of an object Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *false*. + +

Object Environment Records do not provide a `this` binding.

+

HasSuperBinding ( )

-

Regular object Environment Records do not provide a `super` binding.

+

The HasSuperBinding concrete method of an object Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *false*. + +

Object Environment Records do not provide a `super` binding.

+

WithBaseObject ( )

-

Object Environment Records return *undefined* as their WithBaseObject unless their _withEnvironment_ flag is *true*.

+

The WithBaseObject concrete method of an object Environment Record _envRec_ takes no arguments. It performs the following steps when called:

- 1. Let _envRec_ be the object Environment Record for which the method was invoked. 1. If the _withEnvironment_ flag of _envRec_ is *true*, return the binding object for _envRec_. 1. Otherwise, return *undefined*. @@ -6269,8 +6267,8 @@

Function Environment Records

BindThisValue ( _V_ )

+

The BindThisValue concrete method of a function Environment Record _envRec_ takes argument _V_ (an ECMAScript language value). It performs the following steps when called:

- 1. Let _envRec_ be the function Environment Record for which the method was invoked. 1. Assert: _envRec_.[[ThisBindingStatus]] is not ~lexical~. 1. If _envRec_.[[ThisBindingStatus]] is ~initialized~, throw a *ReferenceError* exception. 1. Set _envRec_.[[ThisValue]] to _V_. @@ -6281,16 +6279,16 @@

BindThisValue ( _V_ )

HasThisBinding ( )

+

The HasThisBinding concrete method of a function Environment Record _envRec_ takes no arguments. It performs the following steps when called:

- 1. Let _envRec_ be the function Environment Record for which the method was invoked. 1. If _envRec_.[[ThisBindingStatus]] is ~lexical~, return *false*; otherwise, return *true*.

HasSuperBinding ( )

+

The HasSuperBinding concrete method of a function Environment Record _envRec_ takes no arguments. It performs the following steps when called:

- 1. Let _envRec_ be the function Environment Record for which the method was invoked. 1. If _envRec_.[[ThisBindingStatus]] is ~lexical~, return *false*. 1. If _envRec_.[[FunctionObject]].[[HomeObject]] has the value *undefined*, return *false*; otherwise, return *true*. @@ -6298,8 +6296,8 @@

HasSuperBinding ( )

GetThisBinding ( )

+

The GetThisBinding concrete method of a function Environment Record _envRec_ takes no arguments. It performs the following steps when called:

- 1. Let _envRec_ be the function Environment Record for which the method was invoked. 1. Assert: _envRec_.[[ThisBindingStatus]] is not ~lexical~. 1. If _envRec_.[[ThisBindingStatus]] is ~uninitialized~, throw a *ReferenceError* exception. 1. Return _envRec_.[[ThisValue]]. @@ -6308,8 +6306,8 @@

GetThisBinding ( )

GetSuperBase ( )

+

The GetSuperBase concrete method of a function Environment Record _envRec_ takes no arguments. It performs the following steps when called:

- 1. Let _envRec_ be the function Environment Record for which the method was invoked. 1. Let _home_ be _envRec_.[[FunctionObject]].[[HomeObject]]. 1. If _home_ has the value *undefined*, return *undefined*. 1. Assert: Type(_home_) is Object. @@ -6467,9 +6465,8 @@

Global Environment Records

HasBinding ( _N_ )

-

The concrete Environment Record method HasBinding for global Environment Records simply determines if the argument identifier is one of the identifiers bound by the record:

+

The HasBinding concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier is one of the identifiers bound by the record. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, return *true*. 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. @@ -6479,9 +6476,8 @@

HasBinding ( _N_ )

CreateMutableBinding ( _N_, _D_ )

-

The concrete Environment Record method CreateMutableBinding for global Environment Records creates a new mutable binding for the name _N_ that is uninitialized. The binding is created in the associated DeclarativeRecord. A binding for _N_ must not already exist in the DeclarativeRecord. If Boolean argument _D_ has the value *true* the new binding is marked as being subject to deletion.

+

The CreateMutableBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _D_ (a Boolean). It creates a new mutable binding for the name _N_ that is uninitialized. The binding is created in the associated DeclarativeRecord. A binding for _N_ must not already exist in the DeclarativeRecord. If _D_ has the value *true*, the new binding is marked as being subject to deletion. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, throw a *TypeError* exception. 1. Return _DclRec_.CreateMutableBinding(_N_, _D_). @@ -6490,9 +6486,8 @@

CreateMutableBinding ( _N_, _D_ )

CreateImmutableBinding ( _N_, _S_ )

-

The concrete Environment Record method CreateImmutableBinding for global Environment Records creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If the Boolean argument _S_ has the value *true* the new binding is marked as a strict binding.

+

The CreateImmutableBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It creates a new immutable binding for the name _N_ that is uninitialized. A binding must not already exist in this Environment Record for _N_. If _S_ has the value *true*, the new binding is marked as a strict binding. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, throw a *TypeError* exception. 1. Return _DclRec_.CreateImmutableBinding(_N_, _S_). @@ -6501,9 +6496,8 @@

CreateImmutableBinding ( _N_, _S_ )

InitializeBinding ( _N_, _V_ )

-

The concrete Environment Record method InitializeBinding for global Environment Records is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. An uninitialized binding for _N_ must already exist.

+

The InitializeBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _V_ (an ECMAScript language value). It is used to set the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. An uninitialized binding for _N_ must already exist. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, then 1. Return _DclRec_.InitializeBinding(_N_, _V_). @@ -6515,9 +6509,8 @@

InitializeBinding ( _N_, _V_ )

SetMutableBinding ( _N_, _V_, _S_ )

-

The concrete Environment Record method SetMutableBinding for global Environment Records attempts to change the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. If the binding is an immutable binding, a *TypeError* is thrown if _S_ is *true*. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by the value of the Boolean argument _S_.

+

The SetMutableBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String), _V_ (an ECMAScript language value), and _S_ (a Boolean). It attempts to change the bound value of the current binding of the identifier whose name is the value of the argument _N_ to the value of argument _V_. If the binding is an immutable binding, a *TypeError* is thrown if _S_ is *true*. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, then 1. Return _DclRec_.SetMutableBinding(_N_, _V_, _S_). @@ -6528,9 +6521,8 @@

SetMutableBinding ( _N_, _V_, _S_ )

GetBindingValue ( _N_, _S_ )

-

The concrete Environment Record method GetBindingValue for global Environment Records returns the value of its bound identifier whose name is the value of the argument _N_. If the binding is an uninitialized binding throw a *ReferenceError* exception. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by the value of the Boolean argument _S_.

+

The GetBindingValue concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It returns the value of its bound identifier whose name is the value of the argument _N_. If the binding is an uninitialized binding throw a *ReferenceError* exception. A property named _N_ normally already exists but if it does not or is not currently writable, error handling is determined by _S_. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, then 1. Return _DclRec_.GetBindingValue(_N_, _S_). @@ -6541,9 +6533,8 @@

GetBindingValue ( _N_, _S_ )

DeleteBinding ( _N_ )

-

The concrete Environment Record method DeleteBinding for global Environment Records can only delete bindings that have been explicitly designated as being subject to deletion.

+

The DeleteBinding concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It can only delete bindings that have been explicitly designated as being subject to deletion. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. If _DclRec_.HasBinding(_N_) is *true*, then 1. Return _DclRec_.DeleteBinding(_N_). @@ -6562,21 +6553,29 @@

DeleteBinding ( _N_ )

HasThisBinding ( )

+

The HasThisBinding concrete method of a global Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *true*. + +

Global Environment Records always provide a `this` binding.

+

HasSuperBinding ( )

+

The HasSuperBinding concrete method of a global Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *false*. + +

Global Environment Records do not provide a `super` binding.

+

WithBaseObject ( )

-

Global Environment Records always return *undefined* as their WithBaseObject.

+

The WithBaseObject concrete method of a global Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *undefined*. @@ -6584,17 +6583,16 @@

WithBaseObject ( )

GetThisBinding ( )

+

The GetThisBinding concrete method of a global Environment Record _envRec_ takes no arguments. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Return _envRec_.[[GlobalThisValue]].

HasVarDeclaration ( _N_ )

-

The concrete Environment Record method HasVarDeclaration for global Environment Records determines if the argument identifier has a binding in this record that was created using a |VariableStatement| or a |FunctionDeclaration|:

+

The HasVarDeclaration concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier has a binding in this record that was created using a |VariableStatement| or a |FunctionDeclaration|. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _varDeclaredNames_ be _envRec_.[[VarNames]]. 1. If _varDeclaredNames_ contains _N_, return *true*. 1. Return *false*. @@ -6603,9 +6601,8 @@

HasVarDeclaration ( _N_ )

HasLexicalDeclaration ( _N_ )

-

The concrete Environment Record method HasLexicalDeclaration for global Environment Records determines if the argument identifier has a binding in this record that was created using a lexical declaration such as a |LexicalDeclaration| or a |ClassDeclaration|:

+

The HasLexicalDeclaration concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier has a binding in this record that was created using a lexical declaration such as a |LexicalDeclaration| or a |ClassDeclaration|. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _DclRec_ be _envRec_.[[DeclarativeRecord]]. 1. Return _DclRec_.HasBinding(_N_). @@ -6613,9 +6610,8 @@

HasLexicalDeclaration ( _N_ )

HasRestrictedGlobalProperty ( _N_ )

-

The concrete Environment Record method HasRestrictedGlobalProperty for global Environment Records determines if the argument identifier is the name of a property of the global object that must not be shadowed by a global lexical binding:

+

The HasRestrictedGlobalProperty concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if the argument identifier is the name of a property of the global object that must not be shadowed by a global lexical binding. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be the binding object for _ObjRec_. 1. Let _existingProp_ be ? _globalObject_.[[GetOwnProperty]](_N_). @@ -6630,9 +6626,8 @@

HasRestrictedGlobalProperty ( _N_ )

CanDeclareGlobalVar ( _N_ )

-

The concrete Environment Record method CanDeclareGlobalVar for global Environment Records determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument _N_. Redundant var declarations and var declarations for pre-existing global object properties are allowed.

+

The CanDeclareGlobalVar concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument _N_. Redundant var declarations and var declarations for pre-existing global object properties are allowed. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be the binding object for _ObjRec_. 1. Let _hasProperty_ be ? HasOwnProperty(_globalObject_, _N_). @@ -6643,9 +6638,8 @@

CanDeclareGlobalVar ( _N_ )

CanDeclareGlobalFunction ( _N_ )

-

The concrete Environment Record method CanDeclareGlobalFunction for global Environment Records determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument _N_.

+

The CanDeclareGlobalFunction concrete method of a global Environment Record _envRec_ takes argument _N_ (a String). It determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument _N_. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be the binding object for _ObjRec_. 1. Let _existingProp_ be ? _globalObject_.[[GetOwnProperty]](_N_). @@ -6658,9 +6652,8 @@

CanDeclareGlobalFunction ( _N_ )

CreateGlobalVarBinding ( _N_, _D_ )

-

The concrete Environment Record method CreateGlobalVarBinding for global Environment Records 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.

+

The CreateGlobalVarBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String) and _D_ (a Boolean). 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. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be the binding object for _ObjRec_. 1. Let _hasProperty_ be ? HasOwnProperty(_globalObject_, _N_). @@ -6677,9 +6670,8 @@

CreateGlobalVarBinding ( _N_, _D_ )

CreateGlobalFunctionBinding ( _N_, _V_, _D_ )

-

The concrete Environment Record method CreateGlobalFunctionBinding for global Environment Records 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.

+

The CreateGlobalFunctionBinding concrete method of a global Environment Record _envRec_ takes arguments _N_ (a String), _V_ (an ECMAScript language value), and _D_ (a Boolean). 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. It performs the following steps when called:

- 1. Let _envRec_ be the global Environment Record for which the method was invoked. 1. Let _ObjRec_ be _envRec_.[[ObjectRecord]]. 1. Let _globalObject_ be the binding object for _ObjRec_. 1. Let _existingProp_ be ? _globalObject_.[[GetOwnProperty]](_N_). @@ -6738,10 +6730,9 @@

Module Environment Records

GetBindingValue ( _N_, _S_ )

-

The concrete Environment Record method GetBindingValue for module Environment Records returns the value of its bound identifier whose name is the value of the argument _N_. However, if the binding is an indirect binding the value of the target binding is returned. If the binding exists but is uninitialized a *ReferenceError* is thrown.

+

The GetBindingValue concrete method of a module Environment Record _envRec_ takes arguments _N_ (a String) and _S_ (a Boolean). It returns the value of its bound identifier whose name is the value of the argument _N_. However, if the binding is an indirect binding the value of the target binding is returned. If the binding exists but is uninitialized a *ReferenceError* is thrown. It performs the following steps when called:

1. Assert: _S_ is *true*. - 1. Let _envRec_ be the module Environment Record for which the method was invoked. 1. Assert: _envRec_ has a binding for _N_. 1. If the binding for _N_ is an indirect binding, then 1. Let _M_ and _N2_ be the indirection values provided when this binding for _N_ was created. @@ -6758,10 +6749,7 @@

GetBindingValue ( _N_, _S_ )

DeleteBinding ( _N_ )

-

The concrete Environment Record method DeleteBinding for module Environment Records refuses to delete bindings.

- - 1. Assert: This method is never invoked. See . - +

The DeleteBinding concrete method of a module Environment Record is never used within this specification.

Module Environment Records are only used within strict code and an early error rule prevents the delete operator, in strict code, from being applied to a Reference Record that would resolve to a module Environment Record binding. See .

@@ -6769,14 +6757,18 @@

DeleteBinding ( _N_ )

HasThisBinding ( )

-

Module Environment Records provide a `this` binding.

+

The HasThisBinding concrete method of a module Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *true*. + +

Module Environment Records always provide a `this` binding.

+

GetThisBinding ( )

+

The GetThisBinding concrete method of a module Environment Record _envRec_ takes no arguments. It performs the following steps when called:

1. Return *undefined*. @@ -6784,9 +6776,8 @@

GetThisBinding ( )

CreateImportBinding ( _N_, _M_, _N2_ )

-

The concrete Environment Record method CreateImportBinding for module Environment Records creates a new initialized immutable indirect binding for the name _N_. A binding must not already exist in this Environment Record for _N_. _M_ is a Module Record, and _N2_ is the name of a binding that exists in _M_'s module Environment Record. Accesses to the value of the new binding will indirectly access the bound value of the target binding.

+

The CreateImportBinding concrete method of a module Environment Record _envRec_ takes arguments _N_ (a String), _M_ (a Module Record), and _N2_ (a String). It creates a new initialized immutable indirect binding for the name _N_. A binding must not already exist in this Environment Record for _N_. _N2_ is the name of a binding that exists in _M_'s module Environment Record. Accesses to the value of the new binding will indirectly access the bound value of the target binding. It performs the following steps when called:

- 1. Let _envRec_ be the module Environment Record for which the method was invoked. 1. Assert: _envRec_ does not already have a binding for _N_. 1. Assert: _M_ is a Module Record. 1. Assert: When _M_.[[Environment]] is instantiated it will have a direct binding for _N2_.