On Wed, May 24, 2017 at 1:14 AM, Learner Evermore < [email protected]> wrote:
> ... continuing the above - there is more. Let's now come back to the > analysis part. Yes, it is possible to do the "whole-world analysis" outside > the compiler. But what perspective should the analysis take? It is > irrelevant if it cannot reduce the number of possible classes - we don't > want all of Java runtime library in there, for example. We need to discover > which parts are needed from the code that *could* be executed. GWT > determines this based on entry points and other configuration in the > *.gwt.xml files **and** what it finds in the compilation classpath, as > configured, including its own version of the standard library. So, the > pre-compilation analysis tool would have to configured exactly the same and > process exactly the same configuration as the GWT compilation step. This > would have to evolve in lockstep with GWT. It would also be doing the same > processing and analysis that GWT already has to do - at least the step of > deciding which bits of code to convert to JavaScript before any further > optimization. > My point is simply if the Java->JS compiler is moving to separate compilation, having hooks in it cannot help you if the things you want require whole-world analysis. If the reachability analysis is done at a later "linking" stage, then clearly that cannot be available at the compilation stage. So I think what you want is fundamentally incompatible with the separate compilation direction. That means that either GWT3 is not for you or you will have to build an external tool that basically does much of what the existing GWT compiler does now to get what you want. -- John A. Tamplin -- 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/CAM5k6X-4sYX9-_rYTsQhB%2B1O%2Bc44iKyeJTGO84f7rakCmBkitQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
