Is (eval)(code) a direct eval?

Dmitry A. Soshnikov dmitry.soshnikov at
Sat Oct 9 01:18:39 PDT 2010

  On 09.10.2010 6:57, Jeff Walden wrote:
> My reading of the spec says yes.  (eval evaluates to a Reference with 
> an environment record [object if in a with, lexical otherwise] as base 
> and "eval" as referenced name, and grouping does not GetValue.)  
> Anyone else think I'm mistaken?

No, you're not mistaken, it's a direct call to eval.


P.S.: it's the same as determining /this/ value with applying grouping 
operator, which does not call GetValue. In contrast with other 
operations where the whole picture may confuse:

var bar = {
   baz: foo

bar.baz(); // bar

(bar.baz)(); // also bar
(bar.baz = bar.baz)(); // but here is global object
(bar.baz, bar.baz)(); // also global object
(false || bar.baz)(); // also global object

P.S.[2]: in addition regarding direct/indirect eval calls with examples:

> Jeff
> _______________________________________________
> es5-discuss mailing list
> es5-discuss at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es5-discuss mailing list