Function Environment Recordは、ECMAScript function objectの呼び出しに対応し、その関数内のtop-level declarationsに対するbindingsを含みます。これは新しいthis bindingを確立する場合があります。また、super method呼び出しをサポートするために必要な状態もcaptureします。
The abstract method CreateMutableBinding takes arguments name (a String) and deletable (a Boolean) and returns either a normal completion containing unused or a throw completion.
The abstract method CreateImmutableBinding takes arguments name (a String) and strict (a Boolean) and returns either a normal completion containing unused or a throw completion.
The abstract method InitializeBinding takes arguments name (a String) and value (an ECMAScript language value) and returns either a normal completion containing unused or a throw completion.
The abstract method SetMutableBinding takes arguments name (a String), value (an ECMAScript language value), and strict (a Boolean) and returns either a normal completion containing unused or a throw completion.
The abstract method GetBindingValue takes arguments name (a String) and strict (a Boolean) and returns either a normal completion containing an ECMAScript language value or a throw completion.
The abstract method GetThisBinding takes no arguments and returns either a normal completion containing an ECMAScript language value or a throw completion.
The HasBinding concrete method of an Declarative Environment RecordenvRecord takes argument name (a String) and returns a normal completion containing a Boolean. これは、argument identifierがそのrecordによってbindされるidentifiersの1つであるかどうかを決定します。 It performs the following steps when called:
The CreateMutableBinding concrete method of an Declarative Environment RecordenvRecord takes arguments name (a String) and deletable (a Boolean) and returns a normal completion containing unused. これは、未初期化である名前nameに対する新しいmutable bindingを作成します。このEnvironment Record内にnameに対するbindingが既に存在してはなりません。deletableがtrueなら、新しいbindingは削除対象であるとして印付けられます。 It performs the following steps when called:
The CreateImmutableBinding concrete method of an Declarative Environment RecordenvRecord takes arguments name (a String) and strict (a Boolean) and returns a normal completion containing unused. これは、未初期化である名前nameに対する新しいimmutable bindingを作成します。このEnvironment Record内にnameに対するbindingが既に存在してはなりません。strictがtrueなら、新しいbindingはstrict bindingとして印付けられます。 It performs the following steps when called:
The InitializeBinding concrete method of an Declarative Environment RecordenvRecord takes arguments name (a String) and value (an ECMAScript language value) and returns a normal completion containing unused. これは、名前がnameであるidentifierの現在のbindingのbound valueを、値valueに設定するために使用されます。nameに対する未初期化のbindingが既に存在していなければなりません。 It performs the following steps when called:
The SetMutableBinding concrete method of an Declarative Environment RecordenvRecord takes arguments name (a String), value (an ECMAScript language value), and strict (a Boolean) and returns either a normal completion containing unused or a throw completion. これは、名前がnameであるidentifierの現在のbindingのbound valueを、値valueに変更しようとします。nameに対するbindingは通常既に存在しますが、まれに存在しない場合があります。bindingがimmutable bindingである場合、strictがtrueならTypeErrorがthrowされます。 It performs the following steps when called:
functionf() { eval("var x; x = (delete x, 0);"); }
9.1.1.1.6 GetBindingValue ( name, strict )
The GetBindingValue concrete method of an Declarative Environment RecordenvRecord takes arguments name (a String) and strict (a Boolean) and returns either a normal completion containing an ECMAScript language value or a throw completion. これは、名前がnameである自身のbound identifierの値を返します。bindingが存在するが未初期化である場合、strictの値にかかわらずReferenceErrorがthrowされます。 It performs the following steps when called:
The DeleteBinding concrete method of an Declarative Environment RecordenvRecord takes argument name (a String) and returns a normal completion containing a Boolean. これは、明示的に削除対象として指定されたbindingsのみを削除できます。 It performs the following steps when called:
The HasBinding concrete method of an Object Environment RecordenvRecord takes argument name (a String) and returns either a normal completion containing a Boolean or a throw completion. これは、自身に関連付けられたbinding objectが、名前がnameであるプロパティを持つかどうかを決定します。 It performs the following steps when called:
The CreateMutableBinding concrete method of an Object Environment RecordenvRecord takes arguments name (a String) and deletable (a Boolean) and returns either a normal completion containing unused or a throw completion. これは、Environment Recordに関連付けられたbinding object内に、名前がnameであるプロパティを作成し、それを値undefinedで初期化します。deletableがtrueなら、新しいプロパティの[[Configurable]]属性はtrueに設定されます。そうでなければfalseに設定されます。 It performs the following steps when called:
The InitializeBinding concrete method of an Object Environment RecordenvRecord takes arguments name (a String) and value (an ECMAScript language value) and returns either a normal completion containing unused or a throw completion. これは、名前がnameであるidentifierの現在のbindingのbound valueを、値valueに設定するために使用されます。 It performs the following steps when called:
The SetMutableBinding concrete method of an Object Environment RecordenvRecord takes arguments name (a String), value (an ECMAScript language value), and strict (a Boolean) and returns either a normal completion containing unused or a throw completion. これは、Environment Recordに関連付けられたbinding objectの、名前がnameであるプロパティの値を、値valueに設定しようとします。nameという名前のプロパティは通常既に存在しますが、存在しない場合や現在writableでない場合、error handlingはstrictによって決定されます。 It performs the following steps when called:
The GetBindingValue concrete method of an Object Environment RecordenvRecord takes arguments name (a String) and strict (a Boolean) and returns either a normal completion containing an ECMAScript language value or a throw completion. これは、自身に関連付けられたbinding objectの、名前がnameであるプロパティの値を返します。そのプロパティは既に存在するべきですが、存在しない場合、結果はstrictに依存します。 It performs the following steps when called:
The DeleteBinding concrete method of an Object Environment RecordenvRecord takes argument name (a String) and returns either a normal completion containing a Boolean or a throw completion. これは、environment objectのプロパティに対応するbindingsのうち、その[[Configurable]]属性の値がtrueであるもののみを削除できます。 It performs the following steps when called:
bindingObjをenvRecord.[[BindingObject]]とする。
? bindingObj.[[Delete]](name)を返す。
9.1.1.2.8 HasThisBinding ( )
The HasThisBinding concrete method of an Object Environment RecordenvRecord takes no arguments and returns false. It performs the following steps when called:
The WithBaseObject concrete method of an Object Environment RecordenvRecord takes no arguments and returns an Object or undefined. It performs the following steps when called:
The abstract operation BindThisValue takes arguments envRecord (a Function Environment Record) and value (an ECMAScript language value) and returns either a normal completion containing unused or a throw completion. これはenvRecord.[[ThisValue]]を設定し、それが初期化済みであることを記録します。 It performs the following steps when called:
The abstract operation GetSuperBase takes argument envRecord (a Function Environment Record) and returns an Object, null, or undefined. これは、envRecord内でbindされたsuper property accessesのbaseであるオブジェクトを返します。値undefinedは、そのようなアクセスがruntime errorsを生成することを示します。 It performs the following steps when called:
The HasBinding concrete method of a Global Environment RecordenvRecord takes argument name (a String) and returns either a normal completion containing a Boolean or a throw completion. これは、argument identifierがそのrecordによってbindされるidentifiersの1つであるかどうかを決定します。 It performs the following steps when called:
The CreateMutableBinding concrete method of a Global Environment RecordenvRecord takes arguments name (a String) and deletable (a Boolean) and returns either a normal completion containing unused or a throw completion. これは、未初期化である名前nameに対する新しいmutable bindingを作成します。bindingは関連付けられたDeclarativeRecord内に作成されます。nameに対するbindingは、DeclarativeRecord内に既に存在してはなりません。deletableがtrueなら、新しいbindingは削除対象であるとして印付けられます。 It performs the following steps when called:
The CreateImmutableBinding concrete method of a Global Environment RecordenvRecord takes arguments name (a String) and strict (a Boolean) and returns either a normal completion containing unused or a throw completion. これは、未初期化である名前nameに対する新しいimmutable bindingを作成します。このEnvironment Record内にnameに対するbindingが既に存在してはなりません。strictがtrueなら、新しいbindingはstrict bindingとして印付けられます。 It performs the following steps when called:
The InitializeBinding concrete method of a Global Environment RecordenvRecord takes arguments name (a String) and value (an ECMAScript language value) and returns either a normal completion containing unused or a throw completion. これは、名前がnameであるidentifierの現在のbindingのbound valueを、値valueに設定するために使用されます。nameに対する未初期化のbindingが既に存在していなければなりません。 It performs the following steps when called:
The SetMutableBinding concrete method of a Global Environment RecordenvRecord takes arguments name (a String), value (an ECMAScript language value), and strict (a Boolean) and returns either a normal completion containing unused or a throw completion. これは、名前がnameであるidentifierの現在のbindingのbound valueを、値valueに変更しようとします。bindingがimmutable bindingであり、strictがtrueの場合、TypeErrorがthrowされます。nameという名前のbindingは通常既に存在しますが、存在しない場合や現在writableでない場合、error handlingはstrictによって決定されます。 It performs the following steps when called:
The GetBindingValue concrete method of a Global Environment RecordenvRecord takes arguments name (a String) and strict (a Boolean) and returns either a normal completion containing an ECMAScript language value or a throw completion. これは、名前がnameである自身のbound identifierの値を返します。bindingが未初期化のbindingである場合、ReferenceError例外をthrowします。nameという名前のbindingは通常既に存在しますが、存在しない場合や現在writableでない場合、error handlingはstrictによって決定されます。 It performs the following steps when called:
The HasThisBinding concrete method of a Global Environment RecordenvRecord takes no arguments and returns true. It performs the following steps when called:
The WithBaseObject concrete method of a Global Environment RecordenvRecord takes no arguments and returns undefined. It performs the following steps when called:
undefinedを返す。
9.1.1.4.12 HasLexicalDeclaration ( envRecord, name )
The abstract operation HasLexicalDeclaration takes arguments envRecord (a Global Environment Record) and name (a String) and returns a Boolean. これは、argument identifierが、LexicalDeclarationやClassDeclarationなどのlexical declarationを使用して作成されたbindingをenvRecord内に持つかどうかを決定します。 It performs the following steps when called:
9.1.1.4.13 HasRestrictedGlobalProperty ( envRecord, name )
The abstract operation HasRestrictedGlobalProperty takes arguments envRecord (a Global Environment Record) and name (a String) and returns either a normal completion containing a Boolean or a throw completion. これは、argument identifierが、global lexical bindingによってshadowされてはならないglobal objectのプロパティの名前であるかどうかを決定します。 It performs the following steps when called:
9.1.1.4.14 CanDeclareGlobalVar ( envRecord, name )
The abstract operation CanDeclareGlobalVar takes arguments envRecord (a Global Environment Record) and name (a String) and returns either a normal completion containing a Boolean or a throw completion. これは、同じargument nameで呼び出された場合に、対応するCreateGlobalVarBinding呼び出しが成功するかどうかを決定します。冗長なvar declarationsおよび既存のglobal object propertiesに対するvar declarationsは許可されます。 It performs the following steps when called:
The abstract operation CreateGlobalVarBinding takes arguments envRecord (a Global Environment Record), name (a String), and deletable (a Boolean) and returns either a normal completion containing unused or a throw completion. これは、関連付けられたObject Environment Record内にmutable bindingを作成し、初期化します。bindingが既に存在する場合、それは再利用され、初期化済みであると仮定されます。 It performs the following steps when called:
The abstract operation CreateGlobalFunctionBinding takes arguments envRecord (a Global Environment Record), name (a String), value (an ECMAScript function object), and deletable (a Boolean) and returns either a normal completion containing unused or a throw completion. これは、関連付けられたObject Environment Record内にmutable bindingを作成し、初期化します。bindingが既に存在する場合、それは置き換えられます。 It performs the following steps when called:
Global function declarationsは常にglobal objectのown propertiesとして表現されます。可能であれば、既存のown propertyは標準的なattribute valuesの集合を持つように再構成されます。ステップ7は、InitializeBinding concrete methodを呼び出すことが行うことと等価であり、globalObjがProxyである場合、同じ一連のProxy trap呼び出しを生成します。
The GetBindingValue concrete method of a Module Environment RecordenvRecord takes arguments name (a String) and strict (a Boolean) and returns either a normal completion containing an ECMAScript language value or a throw completion. これは、名前がnameである自身のbound identifierの値を返します。ただし、bindingがindirect bindingである場合、target bindingの値が返されます。bindingが存在するが未初期化である場合、ReferenceErrorがthrowされます。 It performs the following steps when called:
The HasThisBinding concrete method of a Module Environment RecordenvRecord takes no arguments and returns true. It performs the following steps when called:
The abstract operation CreateImportBinding takes arguments envRecord (a Module Environment Record), name (a String), targetModule (a Module Record), and targetName (a String) and returns unused. これは、名前nameに対して、新しい初期化済みimmutable indirect bindingを作成します。envRecord内にnameに対するbindingが既に存在してはなりません。targetNameは、targetModuleのModule Environment Record内に存在するbindingの名前です。新しいbindingの値へのアクセスは、target bindingのbound valueに間接的にアクセスします。 It performs the following steps when called:
The abstract operation GetIdentifierReference takes arguments envRecord (an Environment Record or null), name (a String), and strict (a Boolean) and returns either a normal completion containing a Reference Record or a throw completion. It performs the following steps when called:
The abstract operation NewDeclarativeEnvironment takes argument outerEnv (an Environment Record or null) and returns a Declarative Environment Record. It performs the following steps when called:
The abstract operation NewObjectEnvironment takes arguments obj (an Object), isWithEnv (a Boolean), and outerEnv (an Environment Record or null) and returns an Object Environment Record. It performs the following steps when called:
The abstract operation NewFunctionEnvironment takes arguments func (an ECMAScript function object) and newTarget (an Object or undefined) and returns a Function Environment Record. It performs the following steps when called:
envRecord.[[DisposableResourceStack]] を新しい空の List に設定する。
envRecord を返す。
9.1.2.5 NewGlobalEnvironment ( obj, thisValue )
The abstract operation NewGlobalEnvironment takes arguments obj (an Object) and thisValue (an Object) and returns a Global Environment Record. It performs the following steps when called:
The abstract operation ResolvePrivateIdentifier takes arguments privateEnv (a PrivateEnvironment Record) and identifier (a String) and returns a Private Name. It performs the following steps when called:
評価される前に、すべてのECMAScriptコードはrealmに関連付けられていなければなりません。概念的には、realmは、intrinsic objectsの集合、ECMAScript global environment、そのglobal environmentのscope内に読み込まれたすべてのECMAScriptコード、およびその他の関連状態とリソースから構成されます。
The abstract operation InitializeHostDefinedRealm takes no arguments and returns either a normal completion containing unused or a throw completion. It performs the following steps when called:
The abstract operation SetDefaultGlobalBindings takes argument realmRecord (a Realm Record) and returns either a normal completion containing unused or a throw completion. It performs the following steps when called:
The abstract operation GetActiveScriptOrModule takes no arguments and returns a Script Record, a Module Record, or null. これは、running execution contextに基づいて、running scriptまたはmoduleを決定するために使用されます。 It performs the following steps when called:
The abstract operation ResolveBinding takes argument name (a String) and optional argument envRecord (an Environment Record or undefined) and returns either a normal completion containing a Reference Record or a throw completion. これはnameのbindingを決定するために使用されます。envRecordは、bindingを検索するEnvironment Recordを明示的に提供するために使用できます。 It performs the following steps when called:
The abstract operation GetThisEnvironment takes no arguments and returns an Environment Record. これは、現在keywordthisのbindingを供給しているEnvironment Recordを見つけます。 It performs the following steps when called:
The abstract operation ResolveThisBinding takes no arguments and returns either a normal completion containing an ECMAScript language value or a throw completion. これは、running execution contextのLexicalEnvironmentを使用して、keywordthisのbindingを決定します。 It performs the following steps when called:
The abstract operation GetNewTarget takes no arguments and returns an Object or undefined. これは、running execution contextのLexicalEnvironmentを使用して、NewTarget値を決定します。 It performs the following steps when called:
The abstract operation GetGlobalObject takes no arguments and returns an Object. これは、現在running execution contextによって使用されるglobal objectを返します。 It performs the following steps when called:
The abstract operation RunSuspendedContext takes arguments context (an execution context) and completionRecord (a Completion Record) and returns either a normal completion containing either an ECMAScript language value or unused, or an abrupt completion. これはcontextを再開し(completionRecordを再開値として送信します)、その結果を待ちます。 It performs the following steps when called:
The abstract operation RunCallerContext takes argument value (ECMAScript言語値またはempty) and returns Completion Record. これは呼び出し元コンテキストを再開し(再開値としてvalueを送信する)、もしあればその結果を待つ。 It performs the following steps when called:
web browsersでないECMAScript hostsは、HostCallJobCallbackのデフォルト実装を使用しなければなりません。
9.5.4 HostEnqueueGenericJob ( job, realm )
The host-defined abstract operation HostEnqueueGenericJob takes arguments job (a JobAbstract Closure) and realm (a Realm Record) and returns unused. これは、realm.[[AgentSignifier]]によって示されるagent内のrealmrealmにおいて、将来のある時点で実行されるようにjobをscheduleします。このalgorithmとともに使用されるAbstract Closuresは、priorityやorderingなどの追加制約なしでscheduleされることを意図しています。
The host-defined abstract operation HostEnqueuePromiseJob takes arguments job (a JobAbstract Closure) and realm (a Realm Record or null) and returns unused. これは、将来のある時点で実行されるようにjobをscheduleします。このalgorithmとともに使用されるAbstract Closuresは、Promisesの処理に関連する、またはそれ以外でPromise handling operationsと同じpriorityでscheduleされることを意図しています。
The host-defined abstract operation HostEnqueueTimeoutJob takes arguments timeoutJob (a JobAbstract Closure), realm (a Realm Record), and milliseconds (a non-negative finite Number) and returns unused. これは、realm.[[AgentSignifier]]によって示されるagent内のrealmrealmにおいて、少なくともmillisecondsミリ秒後に実行されるようにtimeoutJobをscheduleします。
The abstract operation IncrementModuleAsyncEvaluationCount takes no arguments and returns a non-negative integer. It performs the following steps when called:
実装がWeakRefsをemptyにするnon-live set objSetを選択した場合、この定義はobjSet内のすべての値に対するWeakRefsを同時にemptyにすることを要求します。言い換えると、空にされなければvの値を観測するexecutionが生じ得る他のWeakRefsをemptyにせずに、値vを指すWeakRefをemptyにすることは、実装にとってconformantではありません。
The host-defined abstract operation HostEnqueueFinalizationRegistryCleanupJob takes argument finalizationRegistry (a FinalizationRegistry) and returns unused.
The abstract operation ClearKeptObjects takes no arguments and returns unused. ECMAScript実装は、ECMAScript実行の同期的sequenceが完了したときにClearKeptObjectsを呼び出すことが期待されます。 It performs the following steps when called:
The abstract operation CleanupFinalizationRegistry takes argument finalizationRegistry (a FinalizationRegistry) and returns either a normal completion containing unused or a throw completion. It performs the following steps when called:
The abstract operation CanBeHeldWeakly takes argument arg (an ECMAScript language value) and returns a Boolean. これは、argがweak referenceとして使用するのに適している場合に限り、trueを返します。weak referenceとして使用するのに適した値のみが、WeakMapのkey、WeakSetのelement、WeakRefのtarget、またはFinalizationRegistryのtargetsの1つになれます。 It performs the following steps when called: