readSlot method

int readSlot(
  1. int nid
)

Returns nid's cached live index, or -1 when its slot was not written at the current generation (not a live member of the list its parent stamp covers).

Implementation

int readSlot(int nid) {
  if (nid < 0 || nid >= _slotStamp.length) {
    return -1;
  }
  return _slotStamp[nid] == _generation ? _liveIndex[nid] : -1;
}