A few months back I noticed an interesting interaction between how direct eval
is defined and multiple globals. What happens if, in one global, you call an
eval from another global as if it were a direct eval?
var indirect = otherGlobal.eval;
eval = indirect;
print(eval(this) === this);
Jeff,
I think your real question reduces to this:
//none strict mode code
globalObj= function() {return this}();
print(otherGlobal.eval(this) === globalObj) //??
The two different calls and the indirect name in your example may make the
question seen like it is about something else
On 02/25/11 13:26, Brendan Eich wrote:
On Feb 25, 2011, at 1:12 PM, Boris Zbarsky wrote:
On 2/25/11 4:08 PM, David Bruant wrote:
I would tend to be more in favor of disallowing Harmony features in
non-strict code (without explicit use strict directive) to avoid
surprises (I'm nuancing below).
On 03/03/2011 04:41 PM, Allen Wirfs-Brock wrote:
I think your real question reduces to this:
//none strict mode code
globalObj= function() {return this}();
print(otherGlobal.eval(this) === globalObj) //??
The two different calls and the indirect name in your example may make the
question
On 02/20/11 21:16, Mark S. Miller wrote:
The specification of Math.LOG10E says:
15.8.1.5 LOG10E
The Number value for the base-10 logarithm of e, the base of the natural
logarithms; this value is approximately 0.4342944819032518.
This property has the attributes { [[Writable]]:
On Mar 3, 2011, at 5:33 PM, Waldemar Horwat wrote:
If we're saying that Harmony is strict-only, settable by a script tag, what
will indirect eval and the Function constructor do if the evaluated code
doesn't start with a use strict directive?
Yeah, strict-only is probably not quite the
On Mar 3, 2011, at 5:45 PM, Jeff Walden wrote:
On 03/03/2011 04:41 PM, Allen Wirfs-Brock wrote:
I think your real question reduces to this:
//none strict mode code
globalObj= function() {return this}();
print(otherGlobal.eval(this) === globalObj) //??
The two different calls and the
On Mar 3, 2011, at 6:55 PM, David Herman wrote:
So I think it might be a little misleading to say Harmony is strict-only.
Who ever said that? :-P
I've written that Harmony is based on ES5 strict. But even ES5 strict code can
call non-strict code. Same goes for Harmony. It's a big shared-heap
So I think it might be a little misleading to say Harmony is strict-only.
Who ever said that? :-P
Yikes... not playing who-said-what. For whatever reason, Waldemar got the
impression that someone said it, and I'm correcting the misconception, that's
all.
I've written that Harmony is based
Hi Jeff,
I agree that the spec should deal with multiple global objects. I'm aware of a
few of the subtleties of multiple globals, but I wouldn't be surprised if there
are more. Thanks for raising this one. I created a placeholder strawman last
week, because I've been intending to get into
10 matches
Mail list logo