use of com.googlecode.aviator.code.interpreter.ir.Label in project aviatorscript by killme2008.
the class InterpretCodeGenerator method onAndLeft.
@Override
public void onAndLeft(final Token<?> lookhead) {
if (!OperationRuntime.containsOpFunction(this.compileEnv, OperatorType.AND)) {
emit(new AssertTypeIR(AssertTypes.Bool));
Label label = makeLabel();
pushLabel0(label);
this.instruments.add(new BranchUnlessIR(label, new SourceInfo(this.sourceFile, lookhead.getLineNo())));
emit(PopIR.INSTANCE);
}
}
use of com.googlecode.aviator.code.interpreter.ir.Label in project aviatorscript by killme2008.
the class InterpretCodeGenerator method onTernaryRight.
@Override
public void onTernaryRight(final Token<?> lookhead) {
Label label1 = popLabel1();
visitLabel(label1);
}
use of com.googlecode.aviator.code.interpreter.ir.Label in project aviatorscript by killme2008.
the class InterpretCodeGenerator method onTernaryBoolean.
@Override
public void onTernaryBoolean(final Token<?> lookhead) {
Label label0 = makeLabel();
pushLabel0(label0);
Label label1 = makeLabel();
pushLabel1(label1);
this.instruments.add(new BranchUnlessIR(label0, new SourceInfo(this.sourceFile, lookhead.getLineNo())));
emit(PopIR.INSTANCE);
}
Aggregations