diff --git a/spec.html b/spec.html index 6fd0a846da9..9a452f82f74 100644 --- a/spec.html +++ b/spec.html @@ -8621,8 +8621,6 @@

FunctionDeclarationInstantiation ( _func_, _argumentsList_ )

--> 1. Let _calleeContext_ be the running execution context. - 1. Let _env_ be the LexicalEnvironment of _calleeContext_. - 1. Let _envRec_ be _env_'s EnvironmentRecord. 1. Let _code_ be _func_.[[ECMAScriptCode]]. 1. Let _strict_ be _func_.[[Strict]]. 1. Let _formals_ be _func_.[[FormalParameters]]. @@ -8652,6 +8650,15 @@

FunctionDeclarationInstantiation ( _func_, _argumentsList_ )

1. Else if _hasParameterExpressions_ is *false*, then 1. If *"arguments"* is an element of _functionNames_ or if *"arguments"* is an element of _lexicalNames_, then 1. Set _argumentsObjectNeeded_ to *false*. + 1. If _strict_ is *true* or if _hasParameterExpressions_ is *false*, then + 1. NOTE: Only a single lexical environment is needed for the parameters and top-level vars. + 1. Let _env_ be the LexicalEnvironment of _calleeContext_. + 1. Let _envRec_ be _env_'s EnvironmentRecord. + 1. Else, + 1. NOTE: A separate Environment Record is needed to ensure that bindings created by direct eval calls in the formal parameter list are outside the environment where parameters are declared. + 1. Let _calleeEnv_ be the LexicalEnvironment of _calleeContext_. + 1. Let _env_ be NewDeclarativeEnvironment(_calleeEnv_). + 1. Let _envRec_ be _env_'s EnvironmentRecord. 1. For each String _paramName_ in _parameterNames_, do 1. Let _alreadyDeclared_ be _envRec_.HasBinding(_paramName_). 1. NOTE: Early errors ensure that duplicate parameter names can only occur in non-strict functions that do not have parameter default values or rest parameters.