bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js
function makeLooped(state, fromSegments, toSegments) {
		var end = Math.min(fromSegments.length, toSegments.length);

		for (var i = 0; i < end; ++i) {
			var fromSegment = fromSegments[i];
			var toSegment = toSegments[i];

			if (toSegment.reachable) {
				fromSegment.nextSegments.push(toSegment);
			}
			if (fromSegment.reachable) {
				toSegment.prevSegments.push(fromSegment);
			}
			fromSegment.allNextSegments.push(toSegment);
			toSegment.allPrevSegments.push(fromSegment);

			if (toSegment.allPrevSegments.length >= 2) {
				CodePathSegment.markPrevSegmentAsLooped(toSegment, fromSegment);
			}

			state.notifyLooped(fromSegment, toSegment);
		}
	}
function makeLooped(state, fromSegments, toSegments) {
		var end = Math.min(fromSegments.length, toSegments.length);

		for (var i = 0; i < end; ++i) {
			var fromSegment = fromSegments[i];
			var toSegment = toSegments[i];

			if (toSegment.reachable) {
				fromSegment.nextSegments.push(toSegment);
			}
			if (fromSegment.reachable) {
				toSegment.prevSegments.push(fromSegment);
			}
			fromSegment.allNextSegments.push(toSegment);
			toSegment.allPrevSegments.push(fromSegment);

			if (toSegment.allPrevSegments.length >= 2) {
				CodePathSegment.markPrevSegmentAsLooped(toSegment, fromSegment);
			}

			state.notifyLooped(fromSegment, toSegment);
		}
	}
function makeLooped ( state , fromSegments , toSegments ) { var end = Math . min ( fromSegments . length , toSegments . length ) ; for ( var i = 0 ; i < end ; ++ i ) { var fromSegment = fromSegments [ i ] ; var toSegment = toSegments [ i ] ; if ( toSegment . reachable ) { fromSegment . nextSegments . push ( toSegment ) ; } if ( fromSegment . reachable ) { toSegment . prevSegments . push ( fromSegment ) ; } fromSegment . allNextSegments . push ( toSegment ) ; toSegment . allPrevSegments . push ( fromSegment ) ; if ( toSegment . allPrevSegments . length >= 2 ) { CodePathSegment . markPrevSegmentAsLooped ( toSegment , fromSegment ) ; } state . notifyLooped ( fromSegment , toSegment ) ; } }
Creates looping path.

@param {CodePathState} state - The instance.
@param {CodePathSegment[]} fromSegments - Segments which are source.
@param {CodePathSegment[]} toSegments - Segments which are destination.
@returns {void}
Creates looping path .