Thank you Colin, that helped. On Thursday, 1 October 2020 at 23:35:04 UTC+2 [email protected] wrote:
> GWT itself hasn't changed substantially in many years - improvements have > mostly been language features, adding support for incremental compilation, > the jsinterop system, etc, so for the most part the optimizations haven't > changed. > > That said, the best way is almost certainly to take a look at the source > code itself, and the JavaToJavaScriptCompiler class has the high level > aspects of this. This is a different way to look at the current process, > but might give you helpful insights in contrast to the link you shared. > > Starting in the compilePermutation() method: > > https://github.com/gwtproject/gwt/blob/master/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java#L304-L467 > This method is well commented, showing the order of operations that take > place. Optimizations on Java source itself largely happens at the > optimizeJava() method, which itself does very little, just check if it > should run, and if so, invokes optimizeJavaToFixedPoint(), then applies one > last optimization: RemoveEmptySuperCalls. optimizeJavaToFixedPoint() can > be found at > > https://github.com/gwtproject/gwt/blob/master/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java#L1415-L1457 > though it largely just invokes optimizeJavaOneTime in a loop until the > code stops changing, and follows up with one optional run to the > DataflowOptimizer. optimizeJavaOneTime can be found at > > https://github.com/gwtproject/gwt/blob/master/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java#L1492-L1517 > Here you can see the optimizations that happen in the main optimization > loop, with a small handful of notes on the order that these must take place. > > After this we're back to the compilerPermutation method, which finishes > normalizing the code to JS and continuing to optimize this lightly, though > not in a loop, just a few specific passes. > > > > > On Thursday, October 1, 2020 at 3:52:04 PM UTC-5 George Georgovassilis > wrote: > >> Is there an up-to-date documentation of optimisations the compiler >> applies? An older page [1] discusses some topics but it isn't clear what of >> that has been implemented. >> (apologies for posting here, I asked this question on the user forum [2] >> but didn't get any replies) >> >> [1] >> https://github.com/gwtproject/old_google_code_wiki/blob/master/AdvancedCompilerOptimizations.wiki.md >> [2] https://groups.google.com/g/google-web-toolkit/c/aOBvgbKjjcw >> >> -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/7076a1f9-5ee9-4680-97f9-d64c14176237n%40googlegroups.com.
