diff --git a/spec.html b/spec.html index bb148fb520..a33227bd28 100644 --- a/spec.html +++ b/spec.html @@ -9379,8 +9379,8 @@

Miscellaneous

Runtime Semantics: InstantiateFunctionObject ( - _scope_: unknown, - _privateScope_: unknown, + _env_: unknown, + _privateEnv_: unknown, )

@@ -9391,7 +9391,7 @@

`function` `(` FormalParameters `)` `{` FunctionBody `}` - 1. Return ? InstantiateOrdinaryFunctionObject of |FunctionDeclaration| with arguments _scope_ and _privateScope_. + 1. Return ? InstantiateOrdinaryFunctionObject of |FunctionDeclaration| with arguments _env_ and _privateEnv_. GeneratorDeclaration : @@ -9399,7 +9399,7 @@

`function` `*` `(` FormalParameters `)` `{` GeneratorBody `}` - 1. Return ? InstantiateGeneratorFunctionObject of |GeneratorDeclaration| with arguments _scope_ and _privateScope_. + 1. Return ? InstantiateGeneratorFunctionObject of |GeneratorDeclaration| with arguments _env_ and _privateEnv_. AsyncGeneratorDeclaration : @@ -9407,7 +9407,7 @@

`async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}` - 1. Return ? InstantiateAsyncGeneratorFunctionObject of |AsyncGeneratorDeclaration| with arguments _scope_ and _privateScope_. + 1. Return ? InstantiateAsyncGeneratorFunctionObject of |AsyncGeneratorDeclaration| with arguments _env_ and _privateEnv_. AsyncFunctionDeclaration : @@ -9415,7 +9415,7 @@

`async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}` - 1. Return ? InstantiateAsyncFunctionObject of |AsyncFunctionDeclaration| with arguments _scope_ and _privateScope_. + 1. Return ? InstantiateAsyncFunctionObject of |AsyncFunctionDeclaration| with arguments _env_ and _privateEnv_. @@ -13352,8 +13352,8 @@

_ParameterList_: a Parse Node, _Body_: a Parse Node, _thisMode_: ~lexical-this~ or ~non-lexical-this~, - _Scope_: an Environment Record, - _PrivateScope_: a PrivateEnvironment Record or *null*, + _env_: an Environment Record, + _privateEnv_: a PrivateEnvironment Record or *null*, )

@@ -13373,8 +13373,8 @@

1. Else if _Strict_ is *true*, set _F_.[[ThisMode]] to ~strict~. 1. Else, set _F_.[[ThisMode]] to ~global~. 1. Set _F_.[[IsClassConstructor]] to *false*. - 1. Set _F_.[[Environment]] to _Scope_. - 1. Set _F_.[[PrivateEnvironment]] to _PrivateScope_. + 1. Set _F_.[[Environment]] to _env_. + 1. Set _F_.[[PrivateEnvironment]] to _privateEnv_. 1. Set _F_.[[ScriptOrModule]] to GetActiveScriptOrModule(). 1. Set _F_.[[Realm]] to the current Realm Record. 1. Set _F_.[[HomeObject]] to *undefined*. @@ -23212,8 +23212,8 @@

Runtime Semantics: InstantiateOrdinaryFunctionObject ( - _scope_: unknown, - _privateScope_: unknown, + _env_: unknown, + _privateEnv_: unknown, )

@@ -23222,7 +23222,7 @@

1. Let _name_ be StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |FunctionDeclaration|. - 1. Let _F_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _F_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_F_, _name_). 1. Perform MakeConstructor(_F_). 1. Return _F_. @@ -23230,7 +23230,7 @@

FunctionDeclaration : `function` `(` FormalParameters `)` `{` FunctionBody `}` 1. Let _sourceText_ be the source text matched by |FunctionDeclaration|. - 1. Let _F_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _F_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_F_, *"default"*). 1. Perform MakeConstructor(_F_). 1. Return _F_. @@ -23251,10 +23251,10 @@

FunctionExpression : `function` `(` FormalParameters `)` `{` FunctionBody `}` 1. If _name_ is not present, set _name_ to *""*. - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |FunctionExpression|. - 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Perform MakeConstructor(_closure_). 1. Return _closure_. @@ -23263,12 +23263,12 @@

1. Assert: _name_ is not present. 1. Set _name_ to StringValue of |BindingIdentifier|. - 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _funcEnv_ be NewDeclarativeEnvironment(_scope_). + 1. Let _outerEnv_ be the running execution context's LexicalEnvironment. + 1. Let _funcEnv_ be NewDeclarativeEnvironment(_outerEnv_). 1. Perform _funcEnv_.CreateImmutableBinding(_name_, *false*). - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |FunctionExpression|. - 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _funcEnv_, _privateScope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Perform MakeConstructor(_closure_). 1. Perform _funcEnv_.InitializeBinding(_name_, _closure_). @@ -23403,15 +23403,15 @@

ArrowFunction : ArrowParameters `=>` ConciseBody 1. If _name_ is not present, set _name_ to *""*. - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |ArrowFunction|. - 1. [id="step-arrowfunction-evaluation-functioncreate"] Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |ArrowParameters|, |ConciseBody|, ~lexical-this~, _scope_, _privateScope_). + 1. [id="step-arrowfunction-evaluation-functioncreate"] Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |ArrowParameters|, |ConciseBody|, ~lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Return _closure_. -

An |ArrowFunction| does not define local bindings for `arguments`, `super`, `this`, or `new.target`. Any reference to `arguments`, `super`, `this`, or `new.target` within an |ArrowFunction| must resolve to a binding in a lexically enclosing environment. Typically this will be the Function Environment of an immediately enclosing function. Even though an |ArrowFunction| may contain references to `super`, the function object created in step is not made into a method by performing MakeMethod. An |ArrowFunction| that references `super` is always contained within a non-|ArrowFunction| and the necessary state to implement `super` is accessible via the _scope_ that is captured by the function object of the |ArrowFunction|.

+

An |ArrowFunction| does not define local bindings for `arguments`, `super`, `this`, or `new.target`. Any reference to `arguments`, `super`, `this`, or `new.target` within an |ArrowFunction| must resolve to a binding in a lexically enclosing environment. Typically this will be the Function Environment of an immediately enclosing function. Even though an |ArrowFunction| may contain references to `super`, the function object created in step is not made into a method by performing MakeMethod. An |ArrowFunction| that references `super` is always contained within a non-|ArrowFunction| and the necessary state to implement `super` is accessible via the _env_ that is captured by the function object of the |ArrowFunction|.

@@ -23542,14 +23542,14 @@

1. Let _propKey_ be the result of evaluating |ClassElementName|. 1. ReturnIfAbrupt(_propKey_). - 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. If _functionPrototype_ is present, then 1. Let _prototype_ be _functionPrototype_. 1. Else, 1. Let _prototype_ be %Function.prototype%. 1. Let _sourceText_ be the source text matched by |MethodDefinition|. - 1. Let _closure_ be OrdinaryFunctionCreate(_prototype_, _sourceText_, |UniqueFormalParameters|, |FunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be OrdinaryFunctionCreate(_prototype_, _sourceText_, |UniqueFormalParameters|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform MakeMethod(_closure_, _object_). 1. Return the Record { [[Key]]: _propKey_, [[Closure]]: _closure_ }. @@ -23574,11 +23574,11 @@

1. Let _propKey_ be the result of evaluating |ClassElementName|. 1. ReturnIfAbrupt(_propKey_). - 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |MethodDefinition|. 1. Let _formalParameterList_ be an instance of the production FormalParameters : [empty]. - 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParameterList_, |FunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParameterList_, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform MakeMethod(_closure_, _object_). 1. Perform SetFunctionName(_closure_, _propKey_, *"get"*). 1. If _propKey_ is a Private Name, then @@ -23592,10 +23592,10 @@

1. Let _propKey_ be the result of evaluating |ClassElementName|. 1. ReturnIfAbrupt(_propKey_). - 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |MethodDefinition|. - 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |PropertySetParameterList|, |FunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, |PropertySetParameterList|, |FunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform MakeMethod(_closure_, _object_). 1. Perform SetFunctionName(_closure_, _propKey_, *"set"*). 1. If _propKey_ is a Private Name, then @@ -23609,10 +23609,10 @@

1. Let _propKey_ be the result of evaluating |ClassElementName|. 1. ReturnIfAbrupt(_propKey_). - 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |GeneratorMethod|. - 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |GeneratorBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform MakeMethod(_closure_, _object_). 1. Perform SetFunctionName(_closure_, _propKey_). 1. Let _prototype_ be ! OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%). @@ -23625,10 +23625,10 @@

1. Let _propKey_ be the result of evaluating |ClassElementName|. 1. ReturnIfAbrupt(_propKey_). - 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the running execution context's LexicalEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncGeneratorMethod|. - 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform ! MakeMethod(_closure_, _object_). 1. Perform ! SetFunctionName(_closure_, _propKey_). 1. Let _prototype_ be ! OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%). @@ -23641,10 +23641,10 @@

1. Let _propKey_ be the result of evaluating |ClassElementName|. 1. ReturnIfAbrupt(_propKey_). - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncMethod|. - 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |UniqueFormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform ! MakeMethod(_closure_, _object_). 1. Perform ! SetFunctionName(_closure_, _propKey_). 1. Return ? DefineMethodProperty(_object_, _propKey_, _closure_, _enumerable_). @@ -23762,8 +23762,8 @@

Runtime Semantics: InstantiateGeneratorFunctionObject ( - _scope_: unknown, - _privateScope_: unknown, + _env_: unknown, + _privateEnv_: unknown, )

@@ -23772,7 +23772,7 @@

1. Let _name_ be StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |GeneratorDeclaration|. - 1. Let _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_F_, _name_). 1. Let _prototype_ be ! OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%). 1. Perform DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -23781,7 +23781,7 @@

GeneratorDeclaration : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}` 1. Let _sourceText_ be the source text matched by |GeneratorDeclaration|. - 1. Let _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _F_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_F_, *"default"*). 1. Let _prototype_ be ! OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%). 1. Perform DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -23803,10 +23803,10 @@

GeneratorExpression : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}` 1. If _name_ is not present, set _name_ to *""*. - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |GeneratorExpression|. - 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Let _prototype_ be ! OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%). 1. Perform DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -23816,12 +23816,12 @@

1. Assert: _name_ is not present. 1. Set _name_ to StringValue of |BindingIdentifier|. - 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _funcEnv_ be NewDeclarativeEnvironment(_scope_). + 1. Let _outerEnv_ be the running execution context's LexicalEnvironment. + 1. Let _funcEnv_ be NewDeclarativeEnvironment(_outerEnv_). 1. Perform _funcEnv_.CreateImmutableBinding(_name_, *false*). - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |GeneratorExpression|. - 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateScope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%GeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Let _prototype_ be ! OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%). 1. Perform DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -23987,8 +23987,8 @@

Runtime Semantics: InstantiateAsyncGeneratorFunctionObject ( - _scope_: unknown, - _privateScope_: unknown, + _env_: unknown, + _privateEnv_: unknown, )

@@ -23999,7 +23999,7 @@

1. Let _name_ be StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |AsyncGeneratorDeclaration|. - 1. Let _F_ be ! OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _F_ be ! OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform ! SetFunctionName(_F_, _name_). 1. Let _prototype_ be ! OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%). 1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -24010,7 +24010,7 @@

1. Let _sourceText_ be the source text matched by |AsyncGeneratorDeclaration|. - 1. Let _F_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _F_ be OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_F_, *"default"*). 1. Let _prototype_ be ! OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%). 1. Perform DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -24034,10 +24034,10 @@

1. If _name_ is not present, set _name_ to *""*. - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncGeneratorExpression|. - 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Let _prototype_ be ! OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%). 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -24049,12 +24049,12 @@

1. Assert: _name_ is not present. 1. Set _name_ to StringValue of |BindingIdentifier|. - 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _funcEnv_ be ! NewDeclarativeEnvironment(_scope_). + 1. Let _outerEnv_ be the running execution context's LexicalEnvironment. + 1. Let _funcEnv_ be ! NewDeclarativeEnvironment(_outerEnv_). 1. Perform ! _funcEnv_.CreateImmutableBinding(_name_, *false*). - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncGeneratorExpression|. - 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateScope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGeneratorFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_). 1. Perform ! SetFunctionName(_closure_, _name_). 1. Let _prototype_ be ! OrdinaryObjectCreate(%AsyncGeneratorFunction.prototype.prototype%). 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -24550,10 +24550,10 @@

1. ReturnIfAbrupt(_name_). 1. If |Initializer?| is present, then 1. Let _formalParameterList_ be an instance of the production FormalParameters : [empty]. - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the empty sequence of Unicode code points. - 1. Let _initializer_ be ! OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParameterList_, |Initializer|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _initializer_ be ! OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParameterList_, |Initializer|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform MakeMethod(_initializer_, _homeObject_). 1. Set _initializer_.[[ClassFieldInitializerName]] to _name_. 1. Else, @@ -24576,10 +24576,10 @@

ClassStaticBlock : `static` `{` ClassStaticBlockBody `}` 1. Let _lex_ be the running execution context's LexicalEnvironment. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the empty sequence of Unicode code points. 1. Let _formalParameters_ be an instance of the production FormalParameters : [empty]. - 1. Let _bodyFunction_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParameters_, |ClassStaticBlockBody|, ~non-lexical-this~, _lex_, _privateScope_). + 1. Let _bodyFunction_ be OrdinaryFunctionCreate(%Function.prototype%, _sourceText_, _formalParameters_, |ClassStaticBlockBody|, ~non-lexical-this~, _lex_, _privateEnv_). 1. Perform MakeMethod(_bodyFunction_, _homeObject_). 1. Return the ClassStaticBlockDefinition Record { [[BodyFunction]]: _bodyFunction_ }. @@ -24658,9 +24658,9 @@

ClassTail : ClassHeritage? `{` ClassBody? `}` 1. Let _env_ be the LexicalEnvironment of the running execution context. - 1. Let _classScope_ be NewDeclarativeEnvironment(_env_). + 1. Let _classEnv_ be NewDeclarativeEnvironment(_env_). 1. If _classBinding_ is not *undefined*, then - 1. Perform _classScope_.CreateImmutableBinding(_classBinding_, *true*). + 1. Perform _classEnv_.CreateImmutableBinding(_classBinding_, *true*). 1. Let _outerPrivateEnvironment_ be the running execution context's PrivateEnvironment. 1. Let _classPrivateEnvironment_ be NewPrivateEnvironment(_outerPrivateEnvironment_). 1. If |ClassBody?| is present, then @@ -24674,7 +24674,7 @@

1. Let _protoParent_ be %Object.prototype%. 1. Let _constructorParent_ be %Function.prototype%. 1. Else, - 1. Set the running execution context's LexicalEnvironment to _classScope_. + 1. Set the running execution context's LexicalEnvironment to _classEnv_. 1. NOTE: The running execution context's PrivateEnvironment is _outerPrivateEnvironment_ when evaluating |ClassHeritage|. 1. Let _superclassRef_ be the result of evaluating |ClassHeritage|. 1. Set the running execution context's LexicalEnvironment to _env_. @@ -24690,7 +24690,7 @@

1. Let _proto_ be ! OrdinaryObjectCreate(_protoParent_). 1. If |ClassBody?| is not present, let _constructor_ be ~empty~. 1. Else, let _constructor_ be ConstructorMethod of |ClassBody|. - 1. Set the running execution context's LexicalEnvironment to _classScope_. + 1. Set the running execution context's LexicalEnvironment to _classEnv_. 1. Set the running execution context's PrivateEnvironment to _classPrivateEnvironment_. 1. If _constructor_ is ~empty~, then 1. Let _defaultConstructor_ be a new Abstract Closure with no parameters that captures nothing and performs the following steps when called: @@ -24753,7 +24753,7 @@

1. Append _element_ to _staticElements_. 1. Set the running execution context's LexicalEnvironment to _env_. 1. If _classBinding_ is not *undefined*, then - 1. Perform _classScope_.InitializeBinding(_classBinding_, _F_). + 1. Perform _classEnv_.InitializeBinding(_classBinding_, _F_). 1. Set _F_.[[PrivateMethods]] to _instancePrivateMethods_. 1. Set _F_.[[Fields]] to _instanceFields_. 1. For each PrivateElement _method_ of _staticPrivateMethods_, do @@ -24909,8 +24909,8 @@

Static Semantics: Early Errors

Runtime Semantics: InstantiateAsyncFunctionObject ( - _scope_: unknown, - _privateScope_: unknown, + _env_: unknown, + _privateEnv_: unknown, )

@@ -24921,7 +24921,7 @@

1. Let _name_ be StringValue of |BindingIdentifier|. 1. Let _sourceText_ be the source text matched by |AsyncFunctionDeclaration|. - 1. Let _F_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _F_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform ! SetFunctionName(_F_, _name_). 1. Return _F_. @@ -24930,7 +24930,7 @@

1. Let _sourceText_ be the source text matched by |AsyncFunctionDeclaration|. - 1. Let _F_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _F_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform ! SetFunctionName(_F_, *"default"*). 1. Return _F_. @@ -24949,10 +24949,10 @@

1. If _name_ is not present, set _name_ to *""*. - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncFunctionExpression|. - 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Return _closure_. @@ -24962,12 +24962,12 @@

1. Assert: _name_ is not present. 1. Set _name_ to StringValue of |BindingIdentifier|. - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _funcEnv_ be ! NewDeclarativeEnvironment(_scope_). + 1. Let _outerEnv_ be the LexicalEnvironment of the running execution context. + 1. Let _funcEnv_ be ! NewDeclarativeEnvironment(_outerEnv_). 1. Perform ! _funcEnv_.CreateImmutableBinding(_name_, *false*). - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncFunctionExpression|. - 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _funcEnv_, _privateScope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _funcEnv_, _privateEnv_). 1. Perform ! SetFunctionName(_closure_, _name_). 1. Perform ! _funcEnv_.InitializeBinding(_name_, _closure_). 1. Return _closure_. @@ -25120,11 +25120,11 @@

1. If _name_ is not present, set _name_ to *""*. - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncArrowFunction|. 1. Let _parameters_ be |AsyncArrowBindingIdentifier|. - 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, _parameters_, |AsyncConciseBody|, ~lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, _parameters_, |AsyncConciseBody|, ~lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Return _closure_. @@ -25133,12 +25133,12 @@

1. If _name_ is not present, set _name_ to *""*. - 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _privateScope_ be the running execution context's PrivateEnvironment. + 1. Let _env_ be the LexicalEnvironment of the running execution context. + 1. Let _privateEnv_ be the running execution context's PrivateEnvironment. 1. Let _sourceText_ be the source text matched by |AsyncArrowFunction|. 1. Let _head_ be the |AsyncArrowHead| that is covered by |CoverCallExpressionAndAsyncArrowHead|. 1. Let _parameters_ be the |ArrowFormalParameters| of _head_. - 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, _parameters_, |AsyncConciseBody|, ~lexical-this~, _scope_, _privateScope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _sourceText_, _parameters_, |AsyncConciseBody|, ~lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_closure_, _name_). 1. Return _closure_. @@ -25676,9 +25676,9 @@

- 1. Let _body_ be ParseText(_sourceText_, |Script|). - 1. If _body_ is a List of errors, return _body_. - 1. Return Script Record { [[Realm]]: _realm_, [[ECMAScriptCode]]: _body_, [[HostDefined]]: _hostDefined_ }. + 1. Let _script_ be ParseText(_sourceText_, |Script|). + 1. If _script_ is a List of errors, return _script_. + 1. Return Script Record { [[Realm]]: _realm_, [[ECMAScriptCode]]: _script_, [[HostDefined]]: _hostDefined_ }.

An implementation may parse script source text and analyse it for Early Error conditions prior to evaluation of ParseScript for that script source text. However, the reporting of any errors must be deferred until the point where this specification actually performs ParseScript upon that source text.

@@ -25705,10 +25705,10 @@

1. Set the PrivateEnvironment of _scriptContext_ to *null*. 1. Suspend the currently running execution context. 1. Push _scriptContext_ onto the execution context stack; _scriptContext_ is now the running execution context. - 1. Let _scriptBody_ be _scriptRecord_.[[ECMAScriptCode]]. - 1. Let _result_ be GlobalDeclarationInstantiation(_scriptBody_, _globalEnv_). + 1. Let _script_ be _scriptRecord_.[[ECMAScriptCode]]. + 1. Let _result_ be GlobalDeclarationInstantiation(_script_, _globalEnv_). 1. If _result_.[[Type]] is ~normal~, then - 1. Set _result_ to the result of evaluating _scriptBody_. + 1. Set _result_ to the result of evaluating _script_. 1. If _result_.[[Type]] is ~normal~ and _result_.[[Value]] is ~empty~, then 1. Set _result_ to NormalCompletion(*undefined*). 1. Suspend _scriptContext_ and remove it from the execution context stack. @@ -29864,9 +29864,9 @@

1. If _expr_ is a List of errors, throw a *SyntaxError* exception. 1. Let _proto_ be ? GetPrototypeFromConstructor(_newTarget_, _fallbackProto_). 1. Let _realmF_ be the current Realm Record. - 1. Let _scope_ be _realmF_.[[GlobalEnv]]. - 1. Let _privateScope_ be *null*. - 1. Let _F_ be ! OrdinaryFunctionCreate(_proto_, _sourceText_, _parameters_, _body_, ~non-lexical-this~, _scope_, _privateScope_). + 1. Let _env_ be _realmF_.[[GlobalEnv]]. + 1. Let _privateEnv_ be *null*. + 1. Let _F_ be ! OrdinaryFunctionCreate(_proto_, _sourceText_, _parameters_, _body_, ~non-lexical-this~, _env_, _privateEnv_). 1. Perform SetFunctionName(_F_, *"anonymous"*). 1. If _kind_ is ~generator~, then 1. Let _prototype_ be ! OrdinaryObjectCreate(%GeneratorFunction.prototype.prototype%).