On Oct 14, 2010, at 1:39 PM, Jeff Walden wrote: > 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,
I wasn't describing any implementation, I was citing ES5 10.1.1, second bullet: * Eval code is strict eval code if it begins with a Directive Prologue that contains a Use Strict Directive or if the call to eval is a direct call (see 15.1.2.1.1) to the eval function that is contained in strict mode code. > 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. This is an implementation detail, independent of ES5 10.1.1 and unobservable unless there's a bug. /be
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss