Java源码示例:org.codehaus.groovy.ast.stmt.WhileStatement
示例1
@Override
public void writeWhileLoop(final WhileStatement statement) {
if (controller.isFastPath()) {
super.writeWhileLoop(statement);
} else {
StatementMeta meta = statement.getNodeMetaData(StatementMeta.class);
FastPathData fastPathData = writeGuards(meta, statement);
boolean oldFastPathBlock = fastPathBlocked;
fastPathBlocked = true;
super.writeWhileLoop(statement);
fastPathBlocked = oldFastPathBlock;
if (fastPathData == null) return;
writeFastPathPrelude(fastPathData);
super.writeWhileLoop(statement);
writeFastPathEpilogue(fastPathData);
}
}
示例2
public void writeWhileLoop(final WhileStatement statement) {
controller.getAcg().onLineNumber(statement, "visitWhileLoop");
writeStatementLabel(statement);
MethodVisitor mv = controller.getMethodVisitor();
controller.getCompileStack().pushLoop(statement.getStatementLabels());
Label continueLabel = controller.getCompileStack().getContinueLabel();
Label breakLabel = controller.getCompileStack().getBreakLabel();
mv.visitLabel(continueLabel);
visitConditionOfLoopingStatement(statement.getBooleanExpression(), breakLabel, mv);
statement.getLoopBlock().visit(controller.getAcg());
mv.visitJumpInsn(GOTO, continueLabel);
mv.visitLabel(breakLabel);
controller.getCompileStack().pop();
}
示例3
public void visitWhileLoop(WhileStatement node) {
pushASTNode(node);
try {
super.visitWhileLoop(node);
} finally {
popASTNode();
}
}
示例4
@Override
public void visitWhileLoop(WhileStatement node) {
if (isInside(node, line, column)) {
super.visitWhileLoop(node);
}
}
示例5
@Override
public void visitWhileLoop(final WhileStatement loop) {
super.visitWhileLoop(loop);
tryFind(WhileStatement.class, loop);
}
示例6
@Override
public void visitWhileLoop(final WhileStatement loop) {
pushContext(loop);
super.visitWhileLoop(loop);
popContext();
}
示例7
public void visitWhileLoop(WhileStatement loop) {
boolean oldInLoop = inLoop;
inLoop = true;
super.visitWhileLoop(loop);
inLoop = oldInLoop;
}
示例8
@Override
public void visitWhileLoop(final WhileStatement loop) {
assertStatementAuthorized(loop);
loop.getBooleanExpression().visit(this);
loop.getLoopBlock().visit(this);
}
示例9
@Override
public final void visitWhileLoop(WhileStatement whileStatement) {
visitLoop(whileStatement);
super.visitWhileLoop(whileStatement);
}
示例10
@Override
public void visitWhileLoop(WhileStatement stmt) {
stmt.setBooleanExpression((BooleanExpression) transform(stmt.getBooleanExpression()));
super.visitWhileLoop(stmt);
}
示例11
@Override
public void visitWhileLoop(final WhileStatement loop) {
super.visitWhileLoop(loop);
trn.visitWhileLoop(loop);
}
示例12
@Override
public void visitWhileLoop(WhileStatement loop) {
loop.getBooleanExpression().visit(this);
loop.getLoopBlock().visit(this);
}
示例13
@Override
public void visitWhileLoop(WhileStatement statement) {
visitStatement(statement);
super.visitWhileLoop(statement);
}
示例14
@Override
public void visitWhileLoop(final WhileStatement statement) {
controller.getStatementWriter().writeWhileLoop(statement);
}
示例15
void visitWhileLoop(WhileStatement statement);