Re: Controlling Inling in GWT compiler

2017-10-17 Thread Peter Donald
> > I still suspect (having not experimented with it) that the "return this" > aliasing will still confuse matters, at least without deliberate code in > closure to handle it. At least with strings, it isn't smart enough: > https://closure-compiler.appspot.com/home#code%3D%252F%252F%2520%253D% >

Re: Controlling Inling in GWT compiler

2017-10-17 Thread Peter Donald
On Wed, Oct 18, 2017 at 1:14 PM, Colin Alworth wrote: > For the first one, chaining methods has the unfortunate detail that each > method has a return value, which the next object is called on. To my > knowledge, there is no optimization in the compiler which currently can >

Controlling Inling in GWT compiler

2017-10-17 Thread Peter Donald
Hi, So I am trying to figure out a way to control inlining in GWT compiler and potentially if it will be compatible with J2CL. My motivation is that I want to build type-safe builders that are compiled away at runtime. The idea is to compile something like new InputBuilder().type(