RFR(S) 8146201: [AOT] Class static initializers that are not pure should not be executed during static compilation
Vladimir Kozlov
vladimir.kozlov at oracle.com
Mon Mar 19 21:16:21 UTC 2018
Changes are fine I think but I don't see changes for AOT code mentioned in bug report:
http://hg.openjdk.java.net/jdk/hs/file/00992d4e8a23/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/AOTBackend.java#l158
Thanks,
Vladimir
On 3/19/18 1:32 PM, dean.long at oracle.com wrote:
> https://bugs.openjdk.java.net/browse/JDK-8146201
> http://cr.openjdk.java.net/~dlong/8146201/webrev
>
> Previously, jaotc would run static initializers on classes it accessed during compilation, which is
> undesirable if those initializers are not pure. This change does not attempt to identify if an
> initializer is pure. Instead, the compiler avoids triggering any initialization at all, while still
> doing eager resolution and linking. The upstream Graal changes have been pushed here:
>
> https://github.com/oracle/graal/commit/8411a80308c4dea31b05897c3bbb1c8e642fdd67
>
> where a new HotSpotLazyInitializationTest test was also added.
>
> dl
More information about the hotspot-compiler-dev
mailing list