TLFromAST recVisitor = TLFromASTApply(rec);
VarRef temp = getTemp(), argsRes = getTemp();
if (arg != null) {
VarRef res = getTemp();
this.statements.addAll(recVisitor.getStatements());
this.statements.add(new Defn(new ValDef(temp.getName(), recVisitor.getExpr(), rec.getType())));
this.statements.addAll(argVisitor.getStatements());
this.statements.add(new Defn(new ValDef(argsRes.getName(), argVisitor.getExpr(), arg.getType())));
this.statements.add(new Defn(new ValDef(res.getName(), new BinOp(temp, argsRes, name), invocation.getType())));
this.expr = new Immediate(res);
return;
}
this.statements.addAll(recVisitor.getStatements());
this.statements.add(new Defn(new ValDef(temp.getName(), recVisitor.getExpr(), rec.getType())));
this.expr = new Inv(temp, name);
}