RFR(S) 8146201: [AOT] Class static initializers that are not pure should not be executed during static compilation

dean.long at oracle.com dean.long at oracle.com
Mon Mar 19 20:32:27 UTC 2018


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