JDK11 & Polyglot

Andrew Dinn adinn at redhat.com
Fri May 24 09:48:18 UTC 2019

On 23/05/2019 20:17, David Lloyd wrote:
> I think that if/when JPMS support comes in, it'll probably substitute
> all these classes away with native image focused versions, similarly
> perhaps to how classes are done.  So IMO this kind of fix is just
> fine.
Yeah, I believe the WeakPairMap is needed because  on the JVM modules
may get garbage collected when their component classes are unloaded --
we don't want the map to end up keeping the modules alive.

When full support for Modules is added to the native image generator the
set of modules ought not be able to fluctuate (class unloading ain't a
thing in native). So, there will be no need to employ weak references in
whatever proxy is employed for the module linkage map.

Your current fix looks fine as a temporary hack.


Andrew Dinn
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander

More information about the graal-dev mailing list