I'm reading the portion of ECMA 262 v5 script that speaks of Function definitions. For both function declarations and function expressions, the following is mentioned:
Return the result of creating a new Function object as specified in 13.2
The first step of what is mentioned in section 13.2 is to "create a new native ECMAScript object..." and then "Set the [[Class]] internal property of F to "Function".
Due to the wording of "creating a new Funciton object", I was wondering if behind the scenes, function declarations/expressions were created by calling new Function(....)?
section 15.3.2.1 of the ECMA Script specification speaks about the new Function(...) expression, and the new Function(...) expression itself refers to the same logic as specified in section 13.2.
Bullet number 11 about the new Function(...) expression specifies...
Section 13.2 is the single source of function creation logic, whether creating a function expression, function declaration, or invoking the Function constructor.
So to answer the question, no. Creating a function declaration/expression doesn't call new Function(...).