Search in sources :

Example 1 with ExprInt

use of lucee.transformer.expression.ExprInt in project Lucee by lucee.

the class TagLoop method writeOutTypeTimes.

private void writeOutTypeTimes(BytecodeContext bc) throws TransformerException {
    Factory f = bc.getFactory();
    GeneratorAdapter adapter = bc.getAdapter();
    int times = adapter.newLocal(Types.INT_VALUE);
    ExprInt timesExpr = CastInt.toExprInt(getAttribute("times").getValue());
    ExpressionUtil.writeOutSilent(timesExpr, bc, Expression.MODE_VALUE);
    adapter.storeLocal(times);
    ForVisitor fiv = new ForVisitor();
    fiv.visitBegin(adapter, 1, false);
    getBody().writeOut(bc);
    fiv.visitEnd(bc, times, true, getStart());
}
Also used : ForVisitor(lucee.transformer.bytecode.visitor.ForVisitor) ExprInt(lucee.transformer.expression.ExprInt) Factory(lucee.transformer.Factory) GeneratorAdapter(org.objectweb.asm.commons.GeneratorAdapter)

Aggregations

Factory (lucee.transformer.Factory)1 ForVisitor (lucee.transformer.bytecode.visitor.ForVisitor)1 ExprInt (lucee.transformer.expression.ExprInt)1 GeneratorAdapter (org.objectweb.asm.commons.GeneratorAdapter)1