Re: Modules and eval

2011-05-02 Thread David Herman
That sounds like a grammar bug -- no time to debug at the moment but I'll address. A Program should be able to import but not export. Dave On May 2, 2011, at 12:50 PM, Erik Arvidsson wrote: http://wiki.ecmascript.org/doku.php?id=harmony:modules

ES5 riddle -- this binding in accessors accessed as global vars

2011-05-02 Thread Mark S. Miller
According to the ES5 spec, should the following program alert the global object or undefined? Why? Object.defineProperty(this, 'foo', {get:function(){use strict; return this;}}); alert((function(){use strict; return foo;})()); -- Cheers, --MarkM

Re: ES5 riddle -- this binding in accessors accessed as global vars

2011-05-02 Thread Allen Wirfs-Brock
According to the spec. it should alert the global object: The reference to foo resolves to a Reference to an object environment record. When getValue is called on that reference it goes through step 5.a and calls GetBindingValue on the env record. GetBindingValue does a [[Get]] on the global

Re: ES5 riddle -- this binding in accessors accessed as global vars

2011-05-02 Thread Mark S. Miller
On Mon, May 2, 2011 at 5:50 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: According to the spec. it should alert the global object: The reference to foo resolves to a Reference to an object environment record. When getValue is called on that reference it goes through step 5.a and calls