int compile(Bytecode code) throws CannotCompileException { code.addLconst(param); return 2; }
@Override int compile(Bytecode code) throws CannotCompileException { code.addLconst(param); return 2; }
public void atIntConst(IntConst i) throws CompileError { arrayDim = 0; long value = i.get(); int type = i.getType(); if (type == IntConstant || type == CharConstant) { exprType = (type == IntConstant ? INT : CHAR); bytecode.addIconst((int)value); } else { exprType = LONG; bytecode.addLconst(value); } }
@Override public void atIntConst(IntConst i) throws CompileError { arrayDim = 0; long value = i.get(); int type = i.getType(); if (type == IntConstant || type == CharConstant) { exprType = (type == IntConstant ? INT : CHAR); bytecode.addIconst((int)value); } else { exprType = LONG; bytecode.addLconst(value); } }
code.addPutstatic(classname, HOLDER, HOLDER_TYPE); code.addLconst(SERIAL_VERSION_UID_VALUE); code.addPutstatic(classname, SERIAL_VERSION_UID_FIELD, SERIAL_VERSION_UID_TYPE); code.addOpcode(Bytecode.RETURN);
protected void atPlusPlusCore(int dup_code, boolean doDup, int token, boolean isPost, Expr expr) throws CompileError { int t = exprType; if (doDup && isPost) bytecode.addOpcode(dup_code); if (t == INT || t == BYTE || t == CHAR || t == SHORT) { bytecode.addIconst(1); bytecode.addOpcode(token == PLUSPLUS ? IADD : ISUB); exprType = INT; } else if (t == LONG) { bytecode.addLconst((long)1); bytecode.addOpcode(token == PLUSPLUS ? LADD : LSUB); } else if (t == FLOAT) { bytecode.addFconst(1.0f); bytecode.addOpcode(token == PLUSPLUS ? FADD : FSUB); } else if (t == DOUBLE) { bytecode.addDconst(1.0); bytecode.addOpcode(token == PLUSPLUS ? DADD : DSUB); } else badType(expr); if (doDup && !isPost) bytecode.addOpcode(dup_code); }
protected void atPlusPlusCore(int dup_code, boolean doDup, int token, boolean isPost, Expr expr) throws CompileError { int t = exprType; if (doDup && isPost) bytecode.addOpcode(dup_code); if (t == INT || t == BYTE || t == CHAR || t == SHORT) { bytecode.addIconst(1); bytecode.addOpcode(token == PLUSPLUS ? IADD : ISUB); exprType = INT; } else if (t == LONG) { bytecode.addLconst(1); bytecode.addOpcode(token == PLUSPLUS ? LADD : LSUB); } else if (t == FLOAT) { bytecode.addFconst(1.0f); bytecode.addOpcode(token == PLUSPLUS ? FADD : FSUB); } else if (t == DOUBLE) { bytecode.addDconst(1.0); bytecode.addOpcode(token == PLUSPLUS ? DADD : DSUB); } else badType(expr); if (doDup && !isPost) bytecode.addOpcode(dup_code); }
b.addLconst(0); b.addLstore(returnVarNo);
bytecode.addLconst(-1); bytecode.addOpcode(LXOR);
code.addPutstatic(classname, HOLDER, HOLDER_TYPE); code.addLconst(SERIAL_VERSION_UID_VALUE); code.addPutstatic(classname, SERIAL_VERSION_UID_FIELD, SERIAL_VERSION_UID_TYPE); code.addOpcode(Bytecode.RETURN);
b.addLconst(0); b.addLstore(returnVarNo);
bytecode.addLconst(-1); bytecode.addOpcode(LXOR);
bytecode.addOpcode(DUP2); bytecode.addLconst((long)1); bytecode.addOpcode(token == PLUSPLUS ? LADD : LSUB); if (doDup && !isPost)
bytecode.addOpcode(DUP2); bytecode.addLconst(1); bytecode.addOpcode(token == PLUSPLUS ? LADD : LSUB); if (doDup && !isPost)
int compile(Bytecode code) throws CannotCompileException { code.addLconst(param); return 2; }
int compile(Bytecode code) throws CannotCompileException { code.addLconst(param); return 2; }
int compile(Bytecode code) throws CannotCompileException { code.addLconst(param); return 2; }
int compile(Bytecode code) throws CannotCompileException { code.addLconst(param); return 2; }
public void atIntConst(IntConst i) throws CompileError { arrayDim = 0; long value = i.get(); int type = i.getType(); if (type == IntConstant || type == CharConstant) { exprType = (type == IntConstant ? INT : CHAR); bytecode.addIconst((int)value); } else { exprType = LONG; bytecode.addLconst(value); } }
public void atIntConst(IntConst i) throws CompileError { arrayDim = 0; long value = i.get(); int type = i.getType(); if (type == IntConstant || type == CharConstant) { exprType = (type == IntConstant ? INT : CHAR); bytecode.addIconst((int)value); } else { exprType = LONG; bytecode.addLconst(value); } }