RFR 8216327 [lworld][c1] checkcast for value type should throw NullPointerException with null operand

Tobias Hartmann tobias.hartmann at oracle.com
Tue Jan 8 16:29:04 UTC 2019


Hi Ioi,

what about Point.box? No null check is needed in that case.

Also, why do you need to deoptimize?

Best regards,
Tobias

On 08.01.19 06:29, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8216327
> http://cr.openjdk.java.net/~iklam/valhalla/8216327-c1-checkcast-null.v01/
> 
> Please review this small fix.
> 
> When we have something like this:
> 
> static Point test() {
>     Object o = null;
>     Point p = (Point)o;
>     return p;
> }
> 
> Deoptimize and let the interpreter generate the NPE.
> 
> Thanks
> - Ioi
> 
> 
> 
> 
> 
> 


More information about the valhalla-dev mailing list