Re: Standard modules?

2014-01-20 Thread Brendan Eich
Allen Wirfs-Brock wrote: It isn't clear that there much need for a global name for GeneratorFunction. If you really eed to access it can always get it via: (function *() {}).constructor Does this present a hazard for CSP, which provides policy controls governing Function? I agree we

Re: Rename Number.prototype.clz to Math.clz

2014-01-20 Thread Luke Wagner
It seems to me that we *must* have Math.clz perform ToUint32() on its input. Otherwise (if ToInt32() is used), even if the expression is written Math.clz(x 0), asm.js/type-inference won't be able to optimize away the 0 branch since the ToInt32() in the semantics of Math.clz will convert a

Re: Standard modules?

2014-01-20 Thread Sebastian McKenzie
It seem strangely inconsistent not to make it a global. I've had to access GeneratorFunction using the aforementioned method when I was writing an async view engine to dynamically create rendering functions like so: var GeneratorFunction = (function *() {}).constructor; var functionBody =

Re: Standard modules?

2014-01-20 Thread David Bruant
Le 20/01/2014 18:39, Brendan Eich a écrit : Allen Wirfs-Brock wrote: It isn't clear that there much need for a global name for GeneratorFunction. If you really eed to access it can always get it via: (function *() {}).constructor Do we even need (function *() {}).constructor !==

Re: Code compilation alternative to Function()

2014-01-20 Thread Gustavs Tēbergs
Following up with a benchmark. (I thought of this idea while working on a parser generator library, but unfortunately for my argument the library turned out really fast...) I decided to write a converter for Asm.js code to see roughly what happens when building code expression by expression, and

Re: Standard modules?

2014-01-20 Thread Allen Wirfs-Brock
On Jan 20, 2014, at 9:39 AM, Brendan Eich wrote: Allen Wirfs-Brock wrote: It isn't clear that there much need for a global name for GeneratorFunction. If you really eed to access it can always get it via: (function *() {}).constructor Does this present a hazard for CSP, which

Re: Standard modules?

2014-01-20 Thread Kevin Reid
On Sun, Jan 19, 2014 at 7:21 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: It isn't clear that there much need for a global name for GeneratorFunction. If you really eed to access it can always get it via: (function *() {}).constructor (as the always helful generator UMO diagram at

New ES6 spec draft (Rev 22, Jan 20, 2014)

2014-01-20 Thread Allen Wirfs-Brock
The draft is available at http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#january_20_2014_draft_rev_22 Big news: Promise and Module Loading/Linking. Still a few loose ends, but we're getting there. Changes include: Promises Module loading/linking semantics Internal

Re: Standard modules?

2014-01-20 Thread Andy Wingo
On Mon 20 Jan 2014 18:39, Brendan Eich bren...@mozilla.com writes: Allen Wirfs-Brock wrote: It isn't clear that there much need for a global name for GeneratorFunction. If you really eed to access it can always get it via: (function *() {}).constructor Does this present a hazard for