Null check object parameter of unsafe access even if it's known to be non null

Roland Westrelin rwestrel at redhat.com
Thu Feb 16 15:37:46 UTC 2017


> Couldn't we have barriers that don't ever generate a null check? E.g.
> shenandoah_read_barrier_not_null()? Or would that crash too?

In that case, the null check that I added won't be emitted anyway
because there has to be a dominating null check. I'm not 100% sure
there's no case where the barrier is removed but we leave the null check
in the code and end up with a useless explicit null check. At this
point, I don't have a better solution. We could revisit that
later. Actually, I wonder if that problem is shenandoah specific. If
it's not then we could see what others think would be a generic
solution.

Roland.


More information about the shenandoah-dev mailing list