2 ms·
The SubstrateVM already does whole-world analysis to only compile methods that are actually used, so reducing the methods in the JAR before hand (which is what
by chrisseaton 9y ago
The SubstrateVM already does whole-world analysis to only compile methods that are actually used, so reducing the methods in the JAR before hand (which is what Jigsaw) would do, would not change anything.
Language VMs compiled using SubstrateVM are larger than you may think because as well as the native code they also need to contain a representation of the code that the compiler can read (IR) so it can dynamically compile the methods that are combined to form the compiled version of your user's code, and we also need to compile a sort of runtime debug information that allows us to jump from optimised code back to the native code when an optimisation proves to be wrong. This is a novel thing - most language VMs jump from optimised code to a bytecode interpreter - we have to jump back to the native code as there is no bytecode interpreter. Finally, a language VM also needs to include all of the Graal compiler itself for dynamic compilation, which is quite a bit of code.