No more modes?

Jeff Walden jwalden+es at MIT.EDU
Thu Oct 14 13:39:26 PDT 2010

On 10/14/2010 08:29 AM, Brendan Eich wrote:
> Thus there is already one bit of opt-in versioning state in ES5, which must be carried from direct eval's caller to callee.

SpiderMonkey currently does this, but fairly shortly (I have patches) it will not.  The eval *function*'s implementation will always perform indirect eval, and only the eval opcode will perform direct eval.  (We could statically distinguish strict+direct from non-strict+direct, too, with a separate opcode, but since it's trivial to query the currently executing script's strictness, runtime detection seems better than burning an opcode.)

That's only SpiderMonkey, of course, but as far as I can tell the concepts are applicable to any ECMAScript implementation.


More information about the es-discuss mailing list