diff --git a/spec.html b/spec.html index f7507527c2..af79e23570 100644 --- a/spec.html +++ b/spec.html @@ -8483,82 +8483,33 @@

[[Construct]] ( _argumentsList_, _newTarget_ )

- -

FunctionAllocate ( _functionPrototype_ )

-

The abstract operation FunctionAllocate requires the argument _functionPrototype_. FunctionAllocate performs the following steps:

+ +

OrdinaryFunctionCreate ( _functionPrototype_, _ParameterList_, _Body_, _thisMode_, _Scope_ )

+

The abstract operation OrdinaryFunctionCreate requires the arguments: an object _functionPrototype_, a parameter list Parse Node specified by _ParameterList_, a body Parse Node specified by _Body_, _thisMode_ which is either ~lexical-this~ or ~non-lexical-this~, and a Lexical Environment specified by _Scope_. OrdinaryFunctionCreate performs the following steps:

1. Assert: Type(_functionPrototype_) is Object. 1. Let _F_ be a newly created ECMAScript function object with the internal slots listed in . 1. Set _F_'s essential internal methods to the default ordinary object definitions specified in . 1. Set _F_.[[Call]] to the definition specified in . - 1. Set _F_.[[IsClassConstructor]] to *false*. 1. Set _F_.[[Prototype]] to _functionPrototype_. 1. Set _F_.[[Extensible]] to *true*. - 1. Set _F_.[[Realm]] to the current Realm Record. - 1. Return _F_. - -
- - -

FunctionInitialize ( _F_, _kind_, _ParameterList_, _Body_, _Scope_ )

-

The abstract operation FunctionInitialize requires the arguments: a function object _F_, _kind_ which is one of (~Normal~, ~Method~, ~Arrow~), a parameter list Parse Node specified by _ParameterList_, a body Parse Node specified by _Body_, a Lexical Environment specified by _Scope_. FunctionInitialize performs the following steps:

- - 1. Let _len_ be the ExpectedArgumentCount of _ParameterList_. - 1. Perform ! SetFunctionLength(_F_, _len_). - 1. If the source text matching _Body_ is strict mode code, let _Strict_ be *true*; else let _Strict_ be *false*. - 1. Set _F_.[[Strict]] to _Strict_. - 1. Set _F_.[[Environment]] to _Scope_. 1. Set _F_.[[FormalParameters]] to _ParameterList_. 1. Set _F_.[[ECMAScriptCode]] to _Body_. - 1. Set _F_.[[ScriptOrModule]] to GetActiveScriptOrModule(). - 1. If _kind_ is ~Arrow~, set _F_.[[ThisMode]] to ~lexical~. + 1. If the source text matching _Body_ is strict mode code, let _Strict_ be *true*; else let _Strict_ be *false*. + 1. Set _F_.[[Strict]] to _Strict_. + 1. If _thisMode_ is ~lexical-this~, set _F_.[[ThisMode]] to ~lexical~. 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_.[[ScriptOrModule]] to GetActiveScriptOrModule(). + 1. Set _F_.[[Realm]] to the current Realm Record. + 1. Let _len_ be the ExpectedArgumentCount of _ParameterList_. + 1. Perform ! SetFunctionLength(_F_, _len_). 1. Return _F_.
- -

FunctionCreate ( _kind_, _ParameterList_, _Body_, _Scope_ [ , _prototype_ ] )

-

The abstract operation FunctionCreate requires the arguments: _kind_ which is one of (~Normal~, ~Method~, ~Arrow~), a parameter list Parse Node specified by _ParameterList_, a body Parse Node specified by _Body_, a Lexical Environment specified by _Scope_, and optionally, an object _prototype_. FunctionCreate performs the following steps:

- - 1. If _prototype_ is not present, then - 1. Set _prototype_ to %Function.prototype%. - 1. Let _F_ be FunctionAllocate(_prototype_). - 1. Return FunctionInitialize(_F_, _kind_, _ParameterList_, _Body_, _Scope_). - -
- - -

GeneratorFunctionCreate ( _kind_, _ParameterList_, _Body_, _Scope_ )

-

The abstract operation GeneratorFunctionCreate requires the arguments: _kind_ which is one of (~Normal~, ~Method~), a parameter list Parse Node specified by _ParameterList_, a body Parse Node specified by _Body_, a Lexical Environment specified by _Scope_. GeneratorFunctionCreate performs the following steps:

- - 1. Let _functionPrototype_ be %Generator%. - 1. Let _F_ be FunctionAllocate(_functionPrototype_). - 1. Return FunctionInitialize(_F_, _kind_, _ParameterList_, _Body_, _Scope_). - -
- - -

AsyncGeneratorFunctionCreate ( _kind_, _ParameterList_, _Body_, _Scope_ )

-

The abstract operation AsyncGeneratorFunctionCreate requires the arguments: _kind_ which is one of (~Normal~, ~Method~), a parameter list Parse Node specified by _ParameterList_, a body Parse Node specified by _Body_, a Lexical Environment specified by _Scope_. AsyncGeneratorFunctionCreate performs the following steps:

- - 1. Let _functionPrototype_ be %AsyncGenerator%. - 1. Let _F_ be ! FunctionAllocate(_functionPrototype_). - 1. Return ! FunctionInitialize(_F_, _kind_, _ParameterList_, _Body_, _Scope_). - -
- - -

AsyncFunctionCreate ( _kind_, _parameters_, _body_, _Scope_ )

-

The abstract operation AsyncFunctionCreate requires the arguments: _kind_ which is one of (~Normal~, ~Method~, ~Arrow~), a parameter list Parse Node specified by _parameters_, a body Parse Node specified by _body_, a Lexical Environment specified by _Scope_. AsyncFunctionCreate performs the following steps:

- - 1. Let _functionPrototype_ be %AsyncFunction.prototype%. - 2. Let _F_ be ! FunctionAllocate(_functionPrototype_). - 3. Return ! FunctionInitialize(_F_, _kind_, _parameters_, _body_, _Scope_). - -
-

AddRestrictedFunctionProperties ( _F_, _realm_ )

The abstract operation AddRestrictedFunctionProperties is called with a function object _F_ and Realm Record _realm_ as its argument. It performs the following steps:

@@ -19388,7 +19339,7 @@

Runtime Semantics: InstantiateFunctionObject

FunctionDeclaration : `function` BindingIdentifier `(` FormalParameters `)` `{` FunctionBody `}` 1. Let _name_ be StringValue of |BindingIdentifier|. - 1. Let _F_ be FunctionCreate(~Normal~, |FormalParameters|, |FunctionBody|, _scope_). + 1. Let _F_ be OrdinaryFunctionCreate(%Function.prototype%, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _scope_). 1. Perform MakeConstructor(_F_). 1. Perform SetFunctionName(_F_, _name_). 1. Set _F_.[[SourceText]] to the source text matched by |FunctionDeclaration|. @@ -19396,7 +19347,7 @@

Runtime Semantics: InstantiateFunctionObject

FunctionDeclaration : `function` `(` FormalParameters `)` `{` FunctionBody `}` - 1. Let _F_ be FunctionCreate(~Normal~, |FormalParameters|, |FunctionBody|, _scope_). + 1. Let _F_ be OrdinaryFunctionCreate(%Function.prototype%, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _scope_). 1. Perform MakeConstructor(_F_). 1. Perform SetFunctionName(_F_, *"default"*). 1. Set _F_.[[SourceText]] to the source text matched by |FunctionDeclaration|. @@ -19434,7 +19385,7 @@

Runtime Semantics: Evaluation

FunctionExpression : `function` `(` FormalParameters `)` `{` FunctionBody `}` 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _closure_ be FunctionCreate(~Normal~, |FormalParameters|, |FunctionBody|, _scope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _scope_). 1. Perform MakeConstructor(_closure_). 1. Set _closure_.[[SourceText]] to the source text matched by |FunctionExpression|. 1. Return _closure_. @@ -19446,7 +19397,7 @@

Runtime Semantics: Evaluation

1. Let _envRec_ be _funcEnv_'s EnvironmentRecord. 1. Let _name_ be StringValue of |BindingIdentifier|. 1. Perform _envRec_.CreateImmutableBinding(_name_, *false*). - 1. Let _closure_ be FunctionCreate(~Normal~, |FormalParameters|, |FunctionBody|, _funcEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, |FormalParameters|, |FunctionBody|, ~non-lexical-this~, _funcEnv_). 1. Perform MakeConstructor(_closure_). 1. Perform SetFunctionName(_closure_, _name_). 1. Set _closure_.[[SourceText]] to the source text matched by |FunctionExpression|. @@ -19709,7 +19660,7 @@

Runtime Semantics: Evaluation

1. Let _scope_ be the LexicalEnvironment of the running execution context. 1. Let _parameters_ be CoveredFormalsList of |ArrowParameters|. - 1. Let _closure_ be FunctionCreate(~Arrow~, _parameters_, |ConciseBody|, _scope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _parameters_, |ConciseBody|, ~lexical-this~, _scope_). 1. Set _closure_.[[SourceText]] to the source text matched by |ArrowFunction|. 1. Return _closure_. @@ -19846,12 +19797,10 @@

Runtime Semantics: DefineMethod

1. ReturnIfAbrupt(_propKey_). 1. Let _scope_ be the running execution context's LexicalEnvironment. 1. If _functionPrototype_ is present as a parameter, then - 1. Let _kind_ be ~Normal~. 1. Let _prototype_ be _functionPrototype_. 1. Else, - 1. Let _kind_ be ~Method~. 1. Let _prototype_ be %Function.prototype%. - 1. Let _closure_ be FunctionCreate(_kind_, |UniqueFormalParameters|, |FunctionBody|, _scope_, _prototype_). + 1. Let _closure_ be OrdinaryFunctionCreate(_prototype_, |UniqueFormalParameters|, |FunctionBody|, ~non-lexical-this~, _scope_). 1. Perform MakeMethod(_closure_, _object_). 1. Set _closure_.[[SourceText]] to the source text matched by |MethodDefinition|. 1. Return the Record { [[Key]]: _propKey_, [[Closure]]: _closure_ }. @@ -19875,7 +19824,7 @@

Runtime Semantics: PropertyDefinitionEvaluation

1. ReturnIfAbrupt(_propKey_). 1. Let _scope_ be the running execution context's LexicalEnvironment. 1. Let _formalParameterList_ be an instance of the production FormalParameters : [empty]. - 1. Let _closure_ be FunctionCreate(~Method~, _formalParameterList_, |FunctionBody|, _scope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, _formalParameterList_, |FunctionBody|, ~non-lexical-this~, _scope_). 1. Perform MakeMethod(_closure_, _object_). 1. Perform SetFunctionName(_closure_, _propKey_, *"get"*). 1. Set _closure_.[[SourceText]] to the source text matched by |MethodDefinition|. @@ -19887,7 +19836,7 @@

Runtime Semantics: PropertyDefinitionEvaluation

1. Let _propKey_ be the result of evaluating |PropertyName|. 1. ReturnIfAbrupt(_propKey_). 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _closure_ be FunctionCreate(~Method~, |PropertySetParameterList|, |FunctionBody|, _scope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Function.prototype%, |PropertySetParameterList|, |FunctionBody|, ~non-lexical-this~, _scope_). 1. Perform MakeMethod(_closure_, _object_). 1. Perform SetFunctionName(_closure_, _propKey_, *"set"*). 1. Set _closure_.[[SourceText]] to the source text matched by |MethodDefinition|. @@ -20103,7 +20052,7 @@

Runtime Semantics: InstantiateFunctionObject

GeneratorDeclaration : `function` `*` BindingIdentifier `(` FormalParameters `)` `{` GeneratorBody `}` 1. Let _name_ be StringValue of |BindingIdentifier|. - 1. Let _F_ be GeneratorFunctionCreate(~Normal~, |FormalParameters|, |GeneratorBody|, _scope_). + 1. Let _F_ be OrdinaryFunctionCreate(%Generator%, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _scope_). 1. Let _prototype_ be ObjectCreate(%Generator.prototype%). 1. Perform DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Perform SetFunctionName(_F_, _name_). @@ -20112,7 +20061,7 @@

Runtime Semantics: InstantiateFunctionObject

GeneratorDeclaration : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}` - 1. Let _F_ be GeneratorFunctionCreate(~Normal~, |FormalParameters|, |GeneratorBody|, _scope_). + 1. Let _F_ be OrdinaryFunctionCreate(%Generator%, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _scope_). 1. Let _prototype_ be ObjectCreate(%Generator.prototype%). 1. Perform DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Perform SetFunctionName(_F_, *"default"*). @@ -20133,7 +20082,7 @@

Runtime Semantics: PropertyDefinitionEvaluation

1. Let _propKey_ be the result of evaluating |PropertyName|. 1. ReturnIfAbrupt(_propKey_). 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _closure_ be GeneratorFunctionCreate(~Method~, |UniqueFormalParameters|, |GeneratorBody|, _scope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Generator%, |UniqueFormalParameters|, |GeneratorBody|, ~non-lexical-this~, _scope_). 1. Perform MakeMethod(_closure_, _object_). 1. Let _prototype_ be ObjectCreate(%Generator.prototype%). 1. Perform DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -20160,7 +20109,7 @@

Runtime Semantics: Evaluation

GeneratorExpression : `function` `*` `(` FormalParameters `)` `{` GeneratorBody `}` 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _closure_ be GeneratorFunctionCreate(~Normal~, |FormalParameters|, |GeneratorBody|, _scope_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Generator%, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _scope_). 1. Let _prototype_ be ObjectCreate(%Generator.prototype%). 1. Perform DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Set _closure_.[[SourceText]] to the source text matched by |GeneratorExpression|. @@ -20173,7 +20122,7 @@

Runtime Semantics: Evaluation

1. Let _envRec_ be _funcEnv_'s EnvironmentRecord. 1. Let _name_ be StringValue of |BindingIdentifier|. 1. Perform _envRec_.CreateImmutableBinding(_name_, *false*). - 1. Let _closure_ be GeneratorFunctionCreate(~Normal~, |FormalParameters|, |GeneratorBody|, _funcEnv_). + 1. Let _closure_ be OrdinaryFunctionCreate(%Generator%, |FormalParameters|, |GeneratorBody|, ~non-lexical-this~, _funcEnv_). 1. Let _prototype_ be ObjectCreate(%Generator.prototype%). 1. Perform DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Perform SetFunctionName(_closure_, _name_). @@ -20430,7 +20379,7 @@

Runtime Semantics: InstantiateFunctionObject

1. Let _name_ be StringValue of |BindingIdentifier|. - 1. Let _F_ be ! AsyncGeneratorFunctionCreate(~Normal~, |FormalParameters|, |AsyncGeneratorBody|, _scope_). + 1. Let _F_ be ! OrdinaryFunctionCreate(%AsyncGenerator%, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _scope_). 1. Let _prototype_ be ! ObjectCreate(%AsyncGenerator.prototype%). 1. Perform ! DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Perform ! SetFunctionName(_F_, _name_). @@ -20442,7 +20391,7 @@

Runtime Semantics: InstantiateFunctionObject

AsyncGeneratorDeclaration : `async` `function` `*` `(` FormalParameters `)` `{` AsyncGeneratorBody `}` - 1. Let _F_ be AsyncGeneratorFunctionCreate(~Normal~, |FormalParameters|, |AsyncGeneratorBody|, _scope_). + 1. Let _F_ be OrdinaryFunctionCreate(%AsyncGenerator%, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _scope_). 1. Let _prototype_ be ObjectCreate(%AsyncGenerator.prototype%). 1. Perform DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Perform SetFunctionName(_F_, *"default"*). @@ -20464,7 +20413,7 @@

Runtime Semantics: PropertyDefinitionEvaluation

1. Let _propKey_ be the result of evaluating |PropertyName|. 1. ReturnIfAbrupt(_propKey_). 1. Let _scope_ be the running execution context's LexicalEnvironment. - 1. Let _closure_ be ! AsyncGeneratorFunctionCreate(~Method~, |UniqueFormalParameters|, |AsyncGeneratorBody|, _scope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGenerator%, |UniqueFormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _scope_). 1. Perform ! MakeMethod(_closure_, _object_). 1. Let _prototype_ be ! ObjectCreate(%AsyncGenerator.prototype%). 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). @@ -20496,7 +20445,7 @@

Runtime Semantics: Evaluation

1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _closure_ be ! AsyncGeneratorFunctionCreate(~Normal~, |FormalParameters|, |AsyncGeneratorBody|, _scope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGenerator%, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _scope_). 1. Let _prototype_ be ! ObjectCreate(%AsyncGenerator.prototype%). 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Set _closure_.[[SourceText]] to the source text matched by |AsyncGeneratorExpression|. @@ -20512,7 +20461,7 @@

Runtime Semantics: Evaluation

1. Let _envRec_ be _funcEnv_'s EnvironmentRecord. 1. Let _name_ be StringValue of |BindingIdentifier|. 1. Perform ! _envRec_.CreateImmutableBinding(_name_). - 1. Let _closure_ be ! AsyncGeneratorFunctionCreate(~Normal~, |FormalParameters|, |AsyncGeneratorBody|, _funcEnv_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncGenerator%, |FormalParameters|, |AsyncGeneratorBody|, ~non-lexical-this~, _funcEnv_). 1. Let _prototype_ be ! ObjectCreate(%AsyncGenerator.prototype%). 1. Perform ! DefinePropertyOrThrow(_closure_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }). 1. Perform ! SetFunctionName(_closure_, _name_). @@ -21077,7 +21026,7 @@

Runtime Semantics: InstantiateFunctionObject

1. Let _name_ be StringValue of |BindingIdentifier|. - 1. Let _F_ be ! AsyncFunctionCreate(~Normal~, |FormalParameters|, |AsyncFunctionBody|, _scope_). + 1. Let _F_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _scope_). 1. Perform ! SetFunctionName(_F_, _name_). 1. Set _F_.[[SourceText]] to the source text matched by |AsyncFunctionDeclaration|. 1. Return _F_. @@ -21086,7 +21035,7 @@

Runtime Semantics: InstantiateFunctionObject

AsyncFunctionDeclaration : `async` `function` `(` FormalParameters `)` `{` AsyncFunctionBody `}` - 1. Let _F_ be ! AsyncFunctionCreate(~Normal~, |FormalParameters|, |AsyncFunctionBody|, _scope_). + 1. Let _F_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _scope_). 1. Perform ! SetFunctionName(_F_, *"default"*). 1. Set _F_.[[SourceText]] to the source text matched by |AsyncFunctionDeclaration|. 1. Return _F_. @@ -21120,7 +21069,7 @@

Runtime Semantics: PropertyDefinitionEvaluation

1. Let _propKey_ be the result of evaluating |PropertyName|. 1. ReturnIfAbrupt(_propKey_). 1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _closure_ be ! AsyncFunctionCreate(~Method~, |UniqueFormalParameters|, |AsyncFunctionBody|, _scope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, |UniqueFormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _scope_). 1. Perform ! MakeMethod(_closure_, _object_). 1. Perform ! SetFunctionName(_closure_, _propKey_). 1. Set _closure_.[[SourceText]] to the source text matched by |AsyncMethod|. @@ -21163,7 +21112,7 @@

Runtime Semantics: Evaluation

1. Let _scope_ be the LexicalEnvironment of the running execution context. - 1. Let _closure_ be ! AsyncFunctionCreate(~Normal~, |FormalParameters|, |AsyncFunctionBody|, _scope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _scope_). 1. Set _closure_.[[SourceText]] to the source text matched by |AsyncFunctionExpression|. 1. Return _closure_. @@ -21177,7 +21126,7 @@

Runtime Semantics: Evaluation

1. Let _envRec_ be _funcEnv_'s EnvironmentRecord. 1. Let _name_ be StringValue of |BindingIdentifier|. 1. Perform ! _envRec_.CreateImmutableBinding(_name_). - 1. Let _closure_ be ! AsyncFunctionCreate(~Normal~, |FormalParameters|, |AsyncFunctionBody|, _funcEnv_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, |FormalParameters|, |AsyncFunctionBody|, ~non-lexical-this~, _funcEnv_). 1. Perform ! SetFunctionName(_closure_, _name_). 1. Perform ! _envRec_.InitializeBinding(_name_, _closure_). 1. Set _closure_.[[SourceText]] to the source text matched by |AsyncFunctionExpression|. @@ -21450,7 +21399,7 @@

Runtime Semantics: Evaluation

1. Let _scope_ be the LexicalEnvironment of the running execution context. 1. Let _parameters_ be |AsyncArrowBindingIdentifier|. - 1. Let _closure_ be ! AsyncFunctionCreate(~Arrow~, _parameters_, |AsyncConciseBody|, _scope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _parameters_, |AsyncConciseBody|, ~lexical-this~, _scope_). 1. Set _closure_.[[SourceText]] to the source text matched by |AsyncArrowFunction|. 1. Return _closure_. @@ -21461,7 +21410,7 @@

Runtime Semantics: Evaluation

1. Let _scope_ be the LexicalEnvironment of the running execution context. 1. Let _head_ be CoveredAsyncArrowHead of |CoverCallExpressionAndAsyncArrowHead|. 1. Let _parameters_ be the |ArrowFormalParameters| of _head_. - 1. Let _closure_ be ! AsyncFunctionCreate(~Arrow~, _parameters_, |AsyncConciseBody|, _scope_). + 1. Let _closure_ be ! OrdinaryFunctionCreate(%AsyncFunction.prototype%, _parameters_, |AsyncConciseBody|, ~lexical-this~, _scope_). 1. Set _closure_.[[SourceText]] to the source text matched by |AsyncArrowFunction|. 1. Return _closure_.
@@ -25795,10 +25744,9 @@

Runtime Semantics: CreateDynamicFunction ( _constructor_, _newTarget_, _kind 1. If _strict_ is *true*, then 1. If BoundNames of _parameters_ contains any duplicate elements, throw a *SyntaxError* exception. 1. Let _proto_ be ? GetPrototypeFromConstructor(_newTarget_, _fallbackProto_). - 1. Let _F_ be FunctionAllocate(_proto_). - 1. Let _realmF_ be _F_.[[Realm]]. + 1. Let _realmF_ be the current Realm Record. 1. Let _scope_ be _realmF_.[[GlobalEnv]]. - 1. Perform FunctionInitialize(_F_, ~Normal~, _parameters_, _body_, _scope_). + 1. Let _F_ be ! OrdinaryFunctionCreate(_proto_, _parameters_, _body_, ~non-lexical-this~, _scope_). 1. If _kind_ is ~generator~, then 1. Let _prototype_ be ObjectCreate(%Generator.prototype%). 1. Perform DefinePropertyOrThrow(_F_, *"prototype"*, PropertyDescriptor { [[Value]]: _prototype_, [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }).