Symmetry between shenandoah_cast_not_null and must_be_not_null

Aleksey Shipilev shade at redhat.com
Wed Oct 25 10:03:51 UTC 2017


Hi Roland,

I have a question about the symmetry between shenandoah_cast_not_null in sh/jdk{8u,9}, and
must_be_not_null in sh/jdk10.

sh/jdk10: library_call.cpp uses this method with do_replace_in_map = true in most cases:

  Node* GraphKit::must_be_not_null(Node* value, bool do_replace_in_map);

sh/jdk8u and sh/jdk9: library_call.cpp uses this helper method that calls into cast_not_null with
do_replace_in_map = false

  Node* shenandoah_cast_not_null(Node* n) {
    return UseShenandoahGC ? cast_not_null(n, false) : n;
  }

  Node* GraphKit::cast_not_null(Node* obj, bool do_replace_in_map);

Is it safe to replace must_be_not_null(node, true) with shenandoah_cast_not_null(node) when backporting?

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list