static markUsed(segment) {
    if (segment.internal.used) {
      return;
    }
    segment.internal.used = true;

    let i;

    if (segment.reachable) {
      for (i = 0; i < segment.allPrevSegments.length; ++i) {
        const prevSegment = segment.allPrevSegments[i];

        prevSegment.allNextSegments.push(segment);
        prevSegment.nextSegments.push(segment);
      }
    } else {
      for (i = 0; i < segment.allPrevSegments.length; ++i) {
        segment.allPrevSegments[i].allNextSegments.push(segment);
      }
    }
  }
Makes a given segment being used.

And this function registers the segment into the previous segments as a next.
@param {CodePathSegment} segment A segment to mark.
@returns {void}