eval

liorean liorean at gmail.com
Thu Mar 6 15:32:20 PST 2008


On 06/03/2008, Lars Hansen <lhansen at adobe.com> wrote:
>  eval(x)
>   look up "eval"
>   if the found value v is the original eval function and
>      the binding object x holding eval is an ES global object and
>      the global object on the scope chain for v is x then

Is this the same x as in "eval(x)" above? The way the sentence runs,
that seems not to be the case. If this is going into spec text,
another letter should probably be used to avoid any ambiguity.

>        invoke eval as follows:
>          the scope chain is the lexical chain in effect at the point of
>  invocation
>          the variable object is the innermost variable object in effect
>  (which is to
>              say that it excludes binding objects introduced for "let",
>  "catch", named
>              function expressions, "switch type", and note also that
>  code at the top
>              level of a class is static initialization code so the
>  variable object
>              is the global object)
>          the value of "this" is the global object x

And here again.

>   else
>     we don't care; invoke v as a normal function
-- 
David "liorean" Andersson



More information about the Es4-discuss mailing list