GetThisBinding()
@@ -11323,20 +11234,18 @@ GetThisBinding ( ): a normal completion containing *undefined*
-
+
CreateImportBinding (
+ _envRec_: a Module Environment Record,
_N_: a String,
_M_: a Module Record,
_N2_: a String,
): ~unused~
1. Assert: _envRec_ does not already have a binding for _N_.
@@ -13343,7 +13252,7 @@
1. NOTE: ToObject produces wrapper objects using _calleeRealm_.
1. Assert: _localEnv_ is a Function Environment Record.
1. Assert: The next step never returns an abrupt completion because _localEnv_.[[ThisBindingStatus]] is not ~initialized~.
- 1. Perform ! _localEnv_.BindThisValue(_thisValue_).
+ 1. Perform ! BindThisValue(_localEnv_, _thisValue_).
1. Return ~unused~.
@@ -19344,7 +19253,7 @@ Runtime Semantics: Evaluation
1. If IsConstructor(_func_) is *false*, throw a *TypeError* exception.
1. Let _result_ be ? Construct(_func_, _argList_, _newTarget_).
1. Let _thisER_ be GetThisEnvironment().
- 1. Perform ? _thisER_.BindThisValue(_result_).
+ 1. Perform ? BindThisValue(_thisER_, _result_).
1. Let _F_ be _thisER_.[[FunctionObject]].
1. Assert: _F_ is an ECMAScript function object.
1. Perform ? InitializeInstanceElements(_result_, _F_).
@@ -19379,7 +19288,7 @@
1. Let _env_ be GetThisEnvironment().
1. Assert: _env_.HasSuperBinding() is *true*.
- 1. Let _baseValue_ be ? _env_.GetSuperBase().
+ 1. Let _baseValue_ be ? GetSuperBase(_env_).
1. Return the Reference Record { [[Base]]: _baseValue_, [[ReferencedName]]: _propertyKey_, [[Strict]]: _strict_, [[ThisValue]]: _actualThis_ }.
@@ -25981,12 +25890,12 @@
1. Let _lexNames_ be the LexicallyDeclaredNames of _script_.
1. Let _varNames_ be the VarDeclaredNames of _script_.
1. For each element _name_ of _lexNames_, do
- 1. If _env_.HasVarDeclaration(_name_) is *true*, throw a *SyntaxError* exception.
- 1. If _env_.HasLexicalDeclaration(_name_) is *true*, throw a *SyntaxError* exception.
- 1. Let _hasRestrictedGlobal_ be ? _env_.HasRestrictedGlobalProperty(_name_).
+ 1. If HasVarDeclaration(_env_, _name_) is *true*, throw a *SyntaxError* exception.
+ 1. If HasLexicalDeclaration(_env_, _name_) is *true*, throw a *SyntaxError* exception.
+ 1. Let _hasRestrictedGlobal_ be ? HasRestrictedGlobalProperty(_env_, _name_).
1. If _hasRestrictedGlobal_ is *true*, throw a *SyntaxError* exception.
1. For each element _name_ of _varNames_, do
- 1. If _env_.HasLexicalDeclaration(_name_) is *true*, throw a *SyntaxError* exception.
+ 1. If HasLexicalDeclaration(_env_, _name_) is *true*, throw a *SyntaxError* exception.
1. Let _varDeclarations_ be the VarScopedDeclarations of _script_.
1. Let _functionsToInitialize_ be a new empty List.
1. Let _declaredFunctionNames_ be a new empty List.
@@ -25996,7 +25905,7 @@
1. NOTE: If there are multiple function declarations for the same name, the last declaration is used.
1. Let _fn_ be the sole element of the BoundNames of _d_.
1. If _declaredFunctionNames_ does not contain _fn_, then
- 1. Let _fnDefinable_ be ? _env_.CanDeclareGlobalFunction(_fn_).
+ 1. Let _fnDefinable_ be ? CanDeclareGlobalFunction(_env_, _fn_).
1. If _fnDefinable_ is *false*, throw a *TypeError* exception.
1. Append _fn_ to _declaredFunctionNames_.
1. Insert _d_ as the first element of _functionsToInitialize_.
@@ -26005,7 +25914,7 @@
1. If _d_ is either a |VariableDeclaration|, a |ForBinding|, or a |BindingIdentifier|, then
1. For each String _vn_ of the BoundNames of _d_, do
1. If _declaredFunctionNames_ does not contain _vn_, then
- 1. Let _vnDefinable_ be ? _env_.CanDeclareGlobalVar(_vn_).
+ 1. Let _vnDefinable_ be ? CanDeclareGlobalVar(_env_, _vn_).
1. If _vnDefinable_ is *false*, throw a *TypeError* exception.
1. If _declaredVarNames_ does not contain _vn_, then
1. Append _vn_ to _declaredVarNames_.
@@ -26023,9 +25932,9 @@
1. For each Parse Node _f_ of _functionsToInitialize_, do
1. Let _fn_ be the sole element of the BoundNames of _f_.
1. Let _fo_ be InstantiateFunctionObject of _f_ with arguments _env_ and _privateEnv_.
- 1. Perform ? _env_.CreateGlobalFunctionBinding(_fn_, _fo_, *false*).
+ 1. Perform ? CreateGlobalFunctionBinding(_env_, _fn_, _fo_, *false*).
1. For each String _vn_ of _declaredVarNames_, do
- 1. Perform ? _env_.CreateGlobalVarBinding(_vn_, *false*).
+ 1. Perform ? CreateGlobalVarBinding(_env_, _vn_, *false*).
1. Return ~unused~.
@@ -28131,7 +28040,7 @@ InitializeEnvironment ( ): either a normal completion containing ~unused~ or
1. Perform ! _env_.CreateImmutableBinding(_in_.[[LocalName]], *true*).
1. Perform ! _env_.InitializeBinding(_in_.[[LocalName]], _namespace_).
1. Else,
- 1. Perform _env_.CreateImportBinding(_in_.[[LocalName]], _resolution_.[[Module]], _resolution_.[[BindingName]]).
+ 1. Perform CreateImportBinding(_env_, _in_.[[LocalName]], _resolution_.[[Module]], _resolution_.[[BindingName]]).
1. Let _moduleContext_ be a new ECMAScript code execution context.
1. Set the Function of _moduleContext_ to *null*.
1. Assert: _module_.[[Realm]] is not *undefined*.
@@ -29132,7 +29041,7 @@
1. If _strict_ is *false*, then
1. If _varEnv_ is a Global Environment Record, then
1. For each element _name_ of _varNames_, do
- 1. If _varEnv_.HasLexicalDeclaration(_name_) is *true*, throw a *SyntaxError* exception.
+ 1. If HasLexicalDeclaration(_varEnv_, _name_) is *true*, throw a *SyntaxError* exception.
1. NOTE: `eval` will not create a global var declaration that would be shadowed by a global lexical declaration.
1. Let _thisEnv_ be _lexEnv_.
1. Assert: The following loop will terminate.
@@ -29161,7 +29070,7 @@
1. Let _fn_ be the sole element of the BoundNames of _d_.
1. If _declaredFunctionNames_ does not contain _fn_, then
1. If _varEnv_ is a Global Environment Record, then
- 1. Let _fnDefinable_ be ? _varEnv_.CanDeclareGlobalFunction(_fn_).
+ 1. Let _fnDefinable_ be ? CanDeclareGlobalFunction(_varEnv_, _fn_).
1. If _fnDefinable_ is *false*, throw a *TypeError* exception.
1. Append _fn_ to _declaredFunctionNames_.
1. Insert _d_ as the first element of _functionsToInitialize_.
@@ -29171,7 +29080,7 @@
1. For each String _vn_ of the BoundNames of _d_, do
1. If _declaredFunctionNames_ does not contain _vn_, then
1. If _varEnv_ is a Global Environment Record, then
- 1. Let _vnDefinable_ be ? _varEnv_.CanDeclareGlobalVar(_vn_).
+ 1. Let _vnDefinable_ be ? CanDeclareGlobalVar(_varEnv_, _vn_).
1. If _vnDefinable_ is *false*, throw a *TypeError* exception.
1. If _declaredVarNames_ does not contain _vn_, then
1. Append _vn_ to _declaredVarNames_.
@@ -29189,7 +29098,7 @@
1. Let _fn_ be the sole element of the BoundNames of _f_.
1. Let _fo_ be InstantiateFunctionObject of _f_ with arguments _lexEnv_ and _privateEnv_.
1. If _varEnv_ is a Global Environment Record, then
- 1. Perform ? _varEnv_.CreateGlobalFunctionBinding(_fn_, _fo_, *true*).
+ 1. Perform ? CreateGlobalFunctionBinding(_varEnv_, _fn_, _fo_, *true*).
1. Else,
1. Let _bindingExists_ be ! _varEnv_.HasBinding(_fn_).
1. If _bindingExists_ is *false*, then
@@ -29200,7 +29109,7 @@
1. Perform ! _varEnv_.SetMutableBinding(_fn_, _fo_, *false*).
1. For each String _vn_ of _declaredVarNames_, do
1. If _varEnv_ is a Global Environment Record, then
- 1. Perform ? _varEnv_.CreateGlobalVarBinding(_vn_, *true*).
+ 1. Perform ? CreateGlobalVarBinding(_varEnv_, _vn_, *true*).
1. Else,
1. Let _bindingExists_ be ! _varEnv_.HasBinding(_vn_).
1. If _bindingExists_ is *false*, then
@@ -51061,12 +50970,12 @@ Changes to GlobalDeclarationInstantiation
1. For each |FunctionDeclaration| _f_ that is directly contained in the |StatementList| of any |Block|, |CaseClause|, or |DefaultClause| _x_ such that _script_ Contains _x_ is *true*, do
1. Let _F_ be the StringValue of the |BindingIdentifier| of _f_.
1. If replacing the |FunctionDeclaration| _f_ with a |VariableStatement| that has _F_ as a |BindingIdentifier| would not produce any Early Errors for _script_, then
- 1. If _env_.HasLexicalDeclaration(_F_) is *false*, then
- 1. Let _fnDefinable_ be ? _env_.CanDeclareGlobalVar(_F_).
+ 1. If HasLexicalDeclaration(_env_, _F_) is *false*, then
+ 1. Let _fnDefinable_ be ? CanDeclareGlobalVar(_env_, _F_).
1. If _fnDefinable_ is *true*, then
1. NOTE: A var binding for _F_ is only instantiated here if it is neither a VarDeclaredName nor the name of another |FunctionDeclaration|.
1. If _declaredFunctionOrVarNames_ does not contain _F_, then
- 1. Perform ? _env_.CreateGlobalVarBinding(_F_, *false*).
+ 1. Perform ? CreateGlobalVarBinding(_env_, _F_, *false*).
1. Append _F_ to _declaredFunctionOrVarNames_.
1. When the |FunctionDeclaration| _f_ is evaluated, perform the following steps in place of the |FunctionDeclaration| Evaluation algorithm provided in :
1. Let _genv_ be the running execution context's VariableEnvironment.
@@ -51095,8 +51004,8 @@ Changes to EvalDeclarationInstantiation
1. [id="step-evaldeclarationinstantiation-web-compat-bindingexists"] Let _bindingExists_ be *true*.
1. Set _thisEnv_ to _thisEnv_.[[OuterEnv]].
1. If _bindingExists_ is *false* and _varEnv_ is a Global Environment Record, then
- 1. If _varEnv_.HasLexicalDeclaration(_F_) is *false*, then
- 1. Let _fnDefinable_ be ? _varEnv_.CanDeclareGlobalVar(_F_).
+ 1. If HasLexicalDeclaration(_varEnv_, _F_) is *false*, then
+ 1. Let _fnDefinable_ be ? CanDeclareGlobalVar(_varEnv_, _F_).
1. Else,
1. Let _fnDefinable_ be *false*.
1. Else,
@@ -51104,7 +51013,7 @@ Changes to EvalDeclarationInstantiation
1. If _bindingExists_ is *false* and _fnDefinable_ is *true*, then
1. If _declaredFunctionOrVarNames_ does not contain _F_, then
1. If _varEnv_ is a Global Environment Record, then
- 1. Perform ? _varEnv_.CreateGlobalVarBinding(_F_, *true*).
+ 1. Perform ? CreateGlobalVarBinding(_varEnv_, _F_, *true*).
1. Else,
1. Let _bindingExists_ be ! _varEnv_.HasBinding(_F_).
1. If _bindingExists_ is *false*, then
|