Re: [gwt-contrib] Potentially simple optimization when creating ObjectLiterals

2016-05-02 Thread Paul Stockley
Thanks. definitely wouldn't hold up 2.8 for it. Are you planning on doing any more compiler enhancements after 2.8 or is it all hands on deck for J2CL? On Sunday, May 1, 2016 at 10:06:34 PM UTC-4, Ray Cromwell wrote: > > A quick fix would be, in a linker, to substitute "new $wnd.Object" > with

Re: [gwt-contrib] Potentially simple optimization when creating ObjectLiterals

2016-05-01 Thread 'Ray Cromwell' via GWT Contributors
A quick fix would be, in a linker, to substitute "new $wnd.Object" with "{}". It's possible to write a peephole pass to fix this in the Compiler, but I think given the number of people clamoring for GWT 2.8 and the other more pressing issues, this would be low on the totem pole. On Sun, May 1,

[gwt-contrib] Potentially simple optimization when creating ObjectLiterals

2016-05-01 Thread Paul Stockley
When you define an object literal as @JsType(isNative = true, namespace = JsPackage.GLOBAL, name="Object") public class SomeObjLiteral { } Calling new on this results in the following javascript code 'new $wnd.Object'. You could just emit {} instead. It is surprising the number times you