RFR 8158736: Adapter class loaders can avoid creating named dynamic modules
Hannes Wallnoefer
hannes.wallnoefer at oracle.com
Mon Jun 6 12:19:41 UTC 2016
Looks good. Nice to see that code removed.
Hannes
Am 2016-06-06 um 11:38 schrieb Sundararajan Athijegannathan:
> Please review: http://cr.openjdk.java.net/~sundar/8158736/webrev.00/ for
> https://bugs.openjdk.java.net/browse/JDK-8158736
>
> Nashorn creates named, dynamic modules for java adapter classes. This
> can be avoided and we can use the default, unnamed module created for
> the adapter class loader. Nashorn allows only subtyping of public,
> exported supertypes be implemented in scripts. The only package used in
> adapter module is exported and the adapter type is public as well.
>
> There is no need for named dynamic module - as there is nothing to
> encapsulate. Nashorn module can still selectively export packages to
> adapter module [ so that generated adapter class can access nashorn
> internals as needed].
>
> This avoids having to generate read-links to the modules of the
> reference types used by the adapter class - because unnamed adapter
> module has read edges to all the modules.
>
> Thanks,
>
> -Sundar
>
More information about the nashorn-dev
mailing list