2.1.20 [ECMA-262-1999] Section 10.1.3, Variable Instantiation

V0031:

For function code: for each formal parameter, as defined in the FormalParameterList, create a property of the variable object whose name is the Identifier and whose attributes are determined by the type of code. The values of the parameters are supplied by the caller as arguments to [[Call]]. If the caller supplies fewer parameter values than there are formal parameters, the extra formal parameters have value undefined. If two or more formal parameters share the same name, hence the same property, the corresponding property is given the value that was supplied for the last parameter with this name. If the value of this last parameter was not supplied by the caller, the value of the corresponding property is undefined. __If any formal parameter has the name arguments, mark the current execution context as having a partially accessible arguments object. This state is used in [MS-ES3EX] section VBArray Objects.__

V0032:

For each FunctionDeclaration __or FunctionExpression__ in the code, in source text order, __do one of the following depending upon the form of the FunctionDeclaration or FunctionExpression:__ #create a property of the variable object whose name is the Identifier in the FunctionDeclaration, whose value is the result returned by creating a Function object as described in [ECMA-262-1999] section 13, and whose attributes are determined by the type of code. If the variable object already has a property with this name, replace its value and attributes. Semantically, this step must follow the creation of FormalParameterList properties.#

  • __If the production is of the form FunctionDeclaration : function ( FormalParameterListopt ) { FunctionBody } or FunctionExpression : function ( FormalParameterListopt ) { FunctionBody } do nothing.__

  • __If the production is of the form FunctionDeclaration : function Identifier (FormalParameterListopt ) { FunctionBody } or FunctionExpression : function Identifier ( FormalParameterListopt ) { FunctionBody } create a property of the variable object whose name is the Identifier in the FunctionDeclaration or FunctionExpression, whose value is the result returned by creating a Function object as described in [ECMA-262-1999] section 13, and whose attributes are determined by the type of code. If the variable object already has a property with this name, replace its value and attributes. Semantically, this step must follow the creation of FormalParameterList properties.__

  • __If the production is of the form FunctionDeclaration : JScriptFunction or FunctionExpression : JScriptFunction perform the following steps:__

    1. __Let func be the result returned by creating a Function object as described in [ECMA-262-1999] section 13.__

    2. __Process the FunctionBindingList element of the JScriptFunction as described in [ECMA-262-1999] section 13 and using func and the attributes for the current type of code as processing arguments.__

In JScript 5.x each FunctionExpression is also included in the above processing step. This means that the value of such a FunctionExpression may be referenced by name within the code that contains it.

V0033:

For each __Catch,__ VariableDeclaration or VariableDeclarationNoIn in the code, create a property of the variable object whose name is the Identifier in the __Catch,__ VariableDeclaration or VariableDeclarationNoIn, whose value is undefined and whose attributes are determined by the type of code. If there is already a property of the variable object with the name of a declared variable, the value of the property and its attributes are not changed. Semantically, this step must follow the creation of the FormalParameterList and FunctionDeclaration properties. In particular, if a declared variable has the same name as a declared function or formal parameter, the variable declaration does not disturb the existing property.