>
> I did not use pretty style because I thought that this flag produces
> different result, I tested now and looks like the output is the same, but,
> I'm pretty sure that some flags changes this issues, optimize is obvious
> that fixes the problem, but I think that namespace=package also changes the
> result.
>

In a nutshell there are optimizations on the Java AST and those are not
affected at all by -style or -Xnamespace. Optimizations that are related to
types, instantiability, devirtualization, etc, are done in the Java AST.

Some optimizations in that JavaScriptAST might be affected by -style (like
DuplicateFunctionRemoval) but those I think they are mostly off. I don't
think -Xnamespace has any impact on optimizations.

That said, if you are using JsInterop, and you have a type that is never
new'ed in Java, the compiler infers that is not instantiable and assumes it
is always null and optimizes accordingly. Types originating from JavaScript
need to be marked as JsType so that the compiler is aware and does not
assume they are null.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAC7T7gmdNkvotuVz_2W6ht79ZRH-DB3ohE%3DMGvxLwRyWAxMDwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to