Symmetry between shenandoah_cast_not_null and must_be_not_null
Roland Westrelin
rwestrel at redhat.com
Wed Oct 25 11:42:45 UTC 2017
> Is it safe to replace must_be_not_null(node, true) with shenandoah_cast_not_null(node) when backporting?
It is.
In both cases, true tells the compiler that it can assume node is not
null in the rest of the method as well. It's usually what we want but
sometimes, it's not safe if there's control flow in the intrinsic. In
8/9, I used false to be safe. In 10, I used true because I expect the
must_be_not_null() calls to land upstream as a separate change and I'd
like to have the most profitable change to be tested.
Roland.
More information about the shenandoah-dev
mailing list