Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8339481

[lworld] C2: Rename InlineTypeNode::IsInit to NotNull

XMLWordPrintable

      A better name for IsInit could be NotNull to indicate that if it is set, it is definitely not null but if it's not set, we do not know whether it's not null or not. Another option could be to name it NullMarker since it's exactly what we set the value to:

        if (!null_free) {
          Node* adr = kit->basic_plus_adr(obj, ptr, null_marker_offset);
          Node* nm_value = kit->access_load_at(obj, adr, TypeRawPtr::BOTTOM, TypeInt::BOOL, T_BOOLEAN, is_array ? (decorators | IS_ARRAY) : decorators);
          vt->set_req(IsInit, nm_value);
        }

      However, without having any background, I would have guessed that NullMarker = true indicates that it's null. But it's the opposite. So, we should definitely add some description at the enum when going with NullMarker.

            mchevalier Marc Chevalier
            chagedorn Christian Hagedorn
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: