RFR (S) 8150180: String.value contents should be trusted

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Feb 19 14:17:43 UTC 2016


On 02/19/2016 03:42 PM, Vladimir Ivanov wrote:
>>    http://cr.openjdk.java.net/~shade/8150180/webrev.hs.01/
> 
> Why don't you check that index is also a constant? Otherwise, C2 can't
> constant fold the loads.
> 
> +  if (value->is_Con()) {
> +    return false;
> +  }

Right. Without that, constant-value + non-constant-index also bail
unnecessarily. Actually, we should also bail only for getChar, but not
putChar:
  http://cr.openjdk.java.net/~shade/8150180/webrev.jdk.01/
  http://cr.openjdk.java.net/~shade/8150180/webrev.hs.02/

Cheers,
-Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160219/5ea2edaa/signature.asc>


More information about the hotspot-compiler-dev mailing list