Search in sources :

Example 1 with InterpretExpression

use of com.googlecode.aviator.InterpretExpression in project aviatorscript by killme2008.

the class InterpretCodeGenerator method getResult.

@Override
public Expression getResult(final boolean unboxObject) {
    final List<IR> instruments = this.instruments;
    // for (IR ir : instruments) {
    // System.out.println(ir);
    // }
    optimize(instruments);
    resolveLabels(instruments);
    final InterpretExpression exp = new InterpretExpression(this.instance, new ArrayList<VariableMeta>(this.variables.values()), this.constantPool, this.symbolTable, instruments, unboxObject);
    exp.setLambdaBootstraps(this.lambdaBootstraps);
    exp.setSourceFile(this.sourceFile);
    exp.setFuncsArgs(this.funcsArgs);
    return exp;
}
Also used : InterpretExpression(com.googlecode.aviator.InterpretExpression) AssertTypeIR(com.googlecode.aviator.code.interpreter.ir.AssertTypeIR) NewLambdaIR(com.googlecode.aviator.code.interpreter.ir.NewLambdaIR) BranchUnlessIR(com.googlecode.aviator.code.interpreter.ir.BranchUnlessIR) LoadIR(com.googlecode.aviator.code.interpreter.ir.LoadIR) GotoIR(com.googlecode.aviator.code.interpreter.ir.GotoIR) OperatorIR(com.googlecode.aviator.code.interpreter.ir.OperatorIR) VisitLabelIR(com.googlecode.aviator.code.interpreter.ir.VisitLabelIR) ClearIR(com.googlecode.aviator.code.interpreter.ir.ClearIR) JumpIR(com.googlecode.aviator.code.interpreter.ir.JumpIR) PopIR(com.googlecode.aviator.code.interpreter.ir.PopIR) BranchIfIR(com.googlecode.aviator.code.interpreter.ir.BranchIfIR) SendIR(com.googlecode.aviator.code.interpreter.ir.SendIR) VariableMeta(com.googlecode.aviator.parser.VariableMeta)

Aggregations

InterpretExpression (com.googlecode.aviator.InterpretExpression)1 AssertTypeIR (com.googlecode.aviator.code.interpreter.ir.AssertTypeIR)1 BranchIfIR (com.googlecode.aviator.code.interpreter.ir.BranchIfIR)1 BranchUnlessIR (com.googlecode.aviator.code.interpreter.ir.BranchUnlessIR)1 ClearIR (com.googlecode.aviator.code.interpreter.ir.ClearIR)1 GotoIR (com.googlecode.aviator.code.interpreter.ir.GotoIR)1 JumpIR (com.googlecode.aviator.code.interpreter.ir.JumpIR)1 LoadIR (com.googlecode.aviator.code.interpreter.ir.LoadIR)1 NewLambdaIR (com.googlecode.aviator.code.interpreter.ir.NewLambdaIR)1 OperatorIR (com.googlecode.aviator.code.interpreter.ir.OperatorIR)1 PopIR (com.googlecode.aviator.code.interpreter.ir.PopIR)1 SendIR (com.googlecode.aviator.code.interpreter.ir.SendIR)1 VisitLabelIR (com.googlecode.aviator.code.interpreter.ir.VisitLabelIR)1 VariableMeta (com.googlecode.aviator.parser.VariableMeta)1