@Override public void visit(WhileStatement statement) { if (statement.getCondition() != null) { statement.getCondition().acceptVisitor(this); } visit(statement.getBody()); }
@Override public void visit(WhileStatement statement) { IdentifiedStatement oldCurrentBlock = currentBlock; currentBlock = statement; visit(statement.getBody()); currentBlock = oldCurrentBlock; if (last && (statement.getCondition() != null || blocksCount.containsKey(statement))) { incrementCurrentBlock(); } }
@Override public void visit(WhileStatement statement) { try { output.writeByte(statement.getCondition() != null ? 5 : 6); writeNullableString(statement.getId()); if (statement.getCondition() != null) { writeExpr(statement.getCondition()); } writeSequence(statement.getBody()); } catch (IOException e) { throw new IOExceptionWrapper(e); } }
@Override public void visit(WhileStatement statement) { if (blockCountVisitor.getCount(statement) > 0) { escaping = true; return; } if (statement.getCondition() != null && check(statement.getBody())) { escaping = true; } }
currentContinueTarget = statement; if (statement.getCondition() != null) { accept(statement.getCondition()); loop.getBody().add(new WasmBranch(negate(result), wrapper)); usedBlocks.add(wrapper);
if (statement.getCondition() != null) { List<Statement> sequenceBackup = resultSequence; resultSequence = new ArrayList<>(); statement.getCondition().acceptVisitor(this); statement.setCondition(resultExpr); resultSequence = sequenceBackup; if (breakStmt.getTarget() == statement) { statement.getBody().remove(0); if (statement.getCondition() != null) { Expr newCondition = Expr.binary(BinaryOperation.AND, null, statement.getCondition(), ExprOptimizer.invert(cond.getCondition())); newCondition.setLocation(statement.getCondition().getLocation()); statement.setCondition(newCondition); } else {
try { debugEmitter.emitStatementStart(); if (statement.getCondition() != null && statement.getCondition().getLocation() != null) { pushLocation(statement.getCondition().getLocation()); if (statement.getCondition() != null) { prevCallSite = debugEmitter.emitCallSite(); precedence = Precedence.min(); statement.getCondition().acceptVisitor(this); debugEmitter.emitCallSite(); if (statement.getCondition().getLocation() != null) { popLocation();
@Override public void visit(WhileStatement statement) { writer.print("while ("); if (statement.getCondition() != null) { statement.getCondition().acceptVisitor(this); } else { writer.print("1"); } writer.println(") {").indent(); visitMany(statement.getBody()); if (statement.getId() != null) { writer.outdent().println("cnt_" + statement.getId() + ":;").indent(); } writer.outdent().println("}"); if (statement.getId() != null) { writer.outdent().println("label_" + statement.getId() + ":;").indent(); } }
@Override public void visit(WhileStatement statement) { if (statement.getCondition() != null) { statement.getCondition().acceptVisitor(this); } visit(statement.getBody()); }
@Override public void visit(WhileStatement statement) { try { output.writeByte(statement.getCondition() != null ? 5 : 6); writeNullableString(statement.getId()); if (statement.getCondition() != null) { writeExpr(statement.getCondition()); } writeSequence(statement.getBody()); } catch (IOException e) { throw new IOExceptionWrapper(e); } }
@Override public void visit(WhileStatement statement) { IdentifiedStatement oldCurrentBlock = currentBlock; currentBlock = statement; visit(statement.getBody()); currentBlock = oldCurrentBlock; if (last && (statement.getCondition() != null || blocksCount.containsKey(statement))) { incrementCurrentBlock(); } }
@Override public void visit(WhileStatement statement) { if (blockCountVisitor.getCount(statement) > 0) { escaping = true; return; } if (statement.getCondition() != null && check(statement.getBody())) { escaping = true; } }
currentContinueTarget = statement; if (statement.getCondition() != null) { accept(statement.getCondition()); loop.getBody().add(new WasmBranch(negate(result), wrapper)); usedBlocks.add(wrapper);
if (statement.getCondition() != null) { List<Statement> sequenceBackup = resultSequence; resultSequence = new ArrayList<>(); statement.getCondition().acceptVisitor(this); statement.setCondition(resultExpr); resultSequence = sequenceBackup; if (breakStmt.getTarget() == statement) { statement.getBody().remove(0); if (statement.getCondition() != null) { Expr newCondition = Expr.binary(BinaryOperation.AND, null, statement.getCondition(), ExprOptimizer.invert(cond.getCondition())); newCondition.setLocation(statement.getCondition().getLocation()); statement.setCondition(newCondition); } else {
try { debugEmitter.emitStatementStart(); if (statement.getCondition() != null && statement.getCondition().getLocation() != null) { pushLocation(statement.getCondition().getLocation()); if (statement.getCondition() != null) { prevCallSite = debugEmitter.emitCallSite(); precedence = Precedence.min(); statement.getCondition().acceptVisitor(this); debugEmitter.emitCallSite(); if (statement.getCondition().getLocation() != null) { popLocation();