diff --git a/spec.html b/spec.html index 1df8fc8e95..0ed7c4dee5 100644 --- a/spec.html +++ b/spec.html @@ -10186,7 +10186,7 @@
Each Declarative Environment Record is associated with an ECMAScript program scope containing variable, constant, let, class, module, import, and/or function declarations. A Declarative Environment Record binds the set of identifiers defined by the declarations contained within its scope.
-The behaviour of the concrete specification methods for Declarative Environment Records is defined by the following algorithms.
The behaviour of the concrete specification methods for Object Environment Records is defined by the following algorithms.
The behaviour of the additional concrete specification methods for Function Environment Records is defined by the following algorithms:
-A Global Environment Record is used to represent the outer most scope that is shared by all of the ECMAScript |Script| elements that are processed in a common realm. A Global Environment Record provides the bindings for built-in globals (clause
A Global Environment Record is logically a single record but it is specified as a composite encapsulating an Object Environment Record and a Declarative Environment Record. The Object Environment Record has as its base object the global object of the associated Realm Record. This global object is the value returned by the Global Environment Record's GetThisBinding concrete method. The Object Environment Record component of a Global Environment Record contains the bindings for all built-in globals (clause
Properties may be created directly on a global object. Hence, the Object Environment Record component of a Global Environment Record may contain both bindings created explicitly by |FunctionDeclaration|, |GeneratorDeclaration|, |AsyncFunctionDeclaration|, |AsyncGeneratorDeclaration|, or |VariableDeclaration| declarations and bindings created implicitly as properties of the global object. In order to identify which bindings were explicitly created using declarations, a Global Environment Record maintains a list of the names bound using its CreateGlobalVarBinding and CreateGlobalFunctionBinding concrete methods.
+Properties may be created directly on a global object. Hence, the Object Environment Record component of a Global Environment Record may contain both bindings created explicitly by |FunctionDeclaration|, |GeneratorDeclaration|, |AsyncFunctionDeclaration|, |AsyncGeneratorDeclaration|, or |VariableDeclaration| declarations and bindings created implicitly as properties of the global object. In order to identify which bindings were explicitly created using declarations, a Global Environment Record maintains a list of the names bound using the CreateGlobalVarBinding and CreateGlobalFunctionBinding abstract operations.
Global Environment Records have the additional fields listed in
- HasVarDeclaration (N) - | -- Determines if the argument identifier has a binding in this Environment Record that was created using a |VariableDeclaration|, |FunctionDeclaration|, |GeneratorDeclaration|, |AsyncFunctionDeclaration|, or |AsyncGeneratorDeclaration|. - | -
- HasLexicalDeclaration (N) - | -- Determines if the argument identifier has a binding in this Environment Record that was created using a lexical declaration such as a |LexicalDeclaration| or a |ClassDeclaration|. - | -
- HasRestrictedGlobalProperty (N) - | -- Determines if the argument is the name of a global object property that may not be shadowed by a global lexical binding. - | -
- CanDeclareGlobalVar (N) - | -- Determines if a corresponding CreateGlobalVarBinding call would succeed if called for the same argument _N_. - | -
- CanDeclareGlobalFunction (N) - | -- Determines if a corresponding CreateGlobalFunctionBinding call would succeed if called for the same argument _N_. - | -
- CreateGlobalVarBinding(N, D) - | -- Used to create and initialize to *undefined* a global `var` binding in the [[ObjectRecord]] component of a Global Environment Record. The binding will be a mutable binding. The corresponding global object property will have attribute values appropriate for a `var`. The String value _N_ is the bound name. If _D_ is *true*, the binding may be deleted. Logically equivalent to CreateMutableBinding followed by a SetMutableBinding but it allows var declarations to receive special treatment. - | -
- CreateGlobalFunctionBinding(N, V, D) - | -- Create and initialize a global `function` binding in the [[ObjectRecord]] component of a Global Environment Record. The binding will be a mutable binding. The corresponding global object property will have attribute values appropriate for a `function`. The String value _N_ is the bound name. _V_ is the initialization value. If the Boolean argument _D_ is *true*, the binding may be deleted. Logically equivalent to CreateMutableBinding followed by a SetMutableBinding but it allows function declarations to receive special treatment. - | -
The behaviour of the concrete specification methods for Global Environment Records is defined by the following algorithms.
The behaviour of the additional concrete specification methods for Module Environment Records are defined by the following algorithms: