bundles/org.eclipse.orion.client.javascript/web/eslint/lib/code-path-analysis/code-path-state.js
function() {
			var context = this.loopContext;

			this.loopContext = context.upper;

			var forkContext = this.forkContext;
			var brokenForkContext = this.popBreakContext().brokenForkContext;
			var choiceContext;

			// Creates a looped path.
			switch (context.type) {
				case "WhileStatement":
				case "ForStatement":
					choiceContext = this.popChoiceContext();
					makeLooped(
						this,
						forkContext.head,
						context.continueDestSegments);
					break;

				case "DoWhileStatement":
					choiceContext = this.popChoiceContext();

					if (!choiceContext.processed) {
						choiceContext.trueForkContext.add(forkContext.head);
						choiceContext.falseForkContext.add(forkContext.head);
					}
					if (context.test !== true) {
						brokenForkContext.addAll(choiceContext.falseForkContext);
					}

					// `true` paths go to looping.
					var segmentsList = choiceContext.trueForkContext.segmentsList;

					for (var i = 0; i < segmentsList.length; ++i) {
						makeLooped(
							this,
							segmentsList[i],
							context.entrySegments);
					}
					break;

				case "ForInStatement":
				case "ForOfStatement":
					brokenForkContext.add(forkContext.head);
					makeLooped(
						this,
						forkContext.head,
						context.leftSegments);
					break;

					/* istanbul ignore next */
				default:
					throw new Error("unreachable");
			}

			// Go next.
			if (brokenForkContext.empty) {
				forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
			} else {
				forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
			}
		}
function() {
			var context = this.loopContext;

			this.loopContext = context.upper;

			var forkContext = this.forkContext;
			var brokenForkContext = this.popBreakContext().brokenForkContext;
			var choiceContext;

			// Creates a looped path.
			switch (context.type) {
				case "WhileStatement":
				case "ForStatement":
					choiceContext = this.popChoiceContext();
					makeLooped(
						this,
						forkContext.head,
						context.continueDestSegments);
					break;

				case "DoWhileStatement":
					choiceContext = this.popChoiceContext();

					if (!choiceContext.processed) {
						choiceContext.trueForkContext.add(forkContext.head);
						choiceContext.falseForkContext.add(forkContext.head);
					}
					if (context.test !== true) {
						brokenForkContext.addAll(choiceContext.falseForkContext);
					}

					// `true` paths go to looping.
					var segmentsList = choiceContext.trueForkContext.segmentsList;

					for (var i = 0; i < segmentsList.length; ++i) {
						makeLooped(
							this,
							segmentsList[i],
							context.entrySegments);
					}
					break;

				case "ForInStatement":
				case "ForOfStatement":
					brokenForkContext.add(forkContext.head);
					makeLooped(
						this,
						forkContext.head,
						context.leftSegments);
					break;

					/* istanbul ignore next */
				default:
					throw new Error("unreachable");
			}

			// Go next.
			if (brokenForkContext.empty) {
				forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
			} else {
				forkContext.replaceHead(brokenForkContext.makeNext(0, -1));
			}
		}
function ( ) { var context = this . loopContext ; this . loopContext = context . upper ; var forkContext = this . forkContext ; var brokenForkContext = this . popBreakContext ( ) . brokenForkContext ; var choiceContext ; // Creates a looped path. switch ( context . type ) { case "WhileStatement" : case "ForStatement" : choiceContext = this . popChoiceContext ( ) ; makeLooped ( this , forkContext . head , context . continueDestSegments ) ; break ; case "DoWhileStatement" : choiceContext = this . popChoiceContext ( ) ; if ( ! choiceContext . processed ) { choiceContext . trueForkContext . add ( forkContext . head ) ; choiceContext . falseForkContext . add ( forkContext . head ) ; } if ( context . test !== true ) { brokenForkContext . addAll ( choiceContext . falseForkContext ) ; } // `true` paths go to looping. var segmentsList = choiceContext . trueForkContext . segmentsList ; for ( var i = 0 ; i < segmentsList . length ; ++ i ) { makeLooped ( this , segmentsList [ i ] , context . entrySegments ) ; } break ; case "ForInStatement" : case "ForOfStatement" : brokenForkContext . add ( forkContext . head ) ; makeLooped ( this , forkContext . head , context . leftSegments ) ; break ; /* istanbul ignore next */ default : throw new Error ( "unreachable" ) ; } // Go next. if ( brokenForkContext . empty ) { forkContext . replaceHead ( forkContext . makeUnreachable ( - 1 , - 1 ) ) ; } else { forkContext . replaceHead ( brokenForkContext . makeNext ( 0 , - 1 ) ) ; } }
Pops the last context of a loop statement and finalizes it.

@returns {void}
Pops the last context of a loop statement and finalizes it .