popOperand();
popOperand();
break;
case Variable:
// load variable
Variable variable = (Variable) lookhead;
if (variable.equals(Variable.TRUE)) {
mv.visitFieldInsn(GETSTATIC, "com/googlecode/aviator/runtime/type/AviatorBoolean", "TRUE",
"Lcom/googlecode/aviator/runtime/type/AviatorBoolean;");
pushOperand(0);
}
else if (variable.equals(Variable.FALSE)) {
mv.visitFieldInsn(GETSTATIC, "com/googlecode/aviator/runtime/type/AviatorBoolean", "FALSE",
"Lcom/googlecode/aviator/runtime/type/AviatorBoolean;");
pushOperand(0);
}
else if (variable.equals(Variable.NIL)) {
mv.visitFieldInsn(GETSTATIC, "com/googlecode/aviator/runtime/type/AviatorNil", "NIL",
"Lcom/googlecode/aviator/runtime/type/AviatorNil;");
pushOperand(0);
}
else {
// check if it is a function name
// if
// (AviatorEvaluator.FUNC_MAP.keySet().contains(variable.getLexeme()))
// {
// throw new CompileExpressionErrorException("index=" +
// variable.getStartIndex() + ","
// + variable.getLexeme() +
// " is a function name,please don't use it as variable");
// }
mv.visitTypeInsn(NEW, "com/googlecode/aviator/runtime/type/AviatorJavaType");
mv.visitInsn(DUP);
mv.visitLdcInsn(variable.getLexeme());
mv.visitMethodInsn(INVOKESPECIAL, "com/googlecode/aviator/runtime/type/AviatorJavaType", "<init>",
"(Ljava/lang/String;)V");
pushOperand(2);
popOperand();
popOperand();