C1 and @Stable array elements

Paul Sandoz paul.sandoz at oracle.com
Thu Nov 19 16:22:30 UTC 2015


Currently C1 does not support constant folding of array elements of an array held by a @Stable field.

How easy or hard would it be for C1 to support such constant folding?

Naively and intuitively, since C1 appears to constant fold an array length (i.e. it knows the array itself is stable or static final), it would in theory seem possible to extend that logic for array elements, such that if the referenced element value is not the default value, produce a constant holding the element value.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20151119/67244084/signature.asc>

More information about the hotspot-compiler-dev mailing list