Пример #1
0
			public override void OnWhileStatement(WhileStatement node)
			{
				if (node.OrBlock == null) return;

				InternalLocal enteredLoop = CodeBuilder().DeclareTempLocal(_currentMethod, BoolType());

				IfStatement orPart = new IfStatement(
					node.OrBlock.LexicalInfo,
					CodeBuilder().CreateNotExpression(CodeBuilder().CreateReference(enteredLoop)),
					node.OrBlock,
					null);

				node.OrBlock = orPart.ToBlock();
				node.Block.Insert(0,
					CodeBuilder().CreateAssignment(
						CreateReference(enteredLoop),
						CreateTrueLiteral()));

			}