/** * Generates JVM bytecode to evaluate this expression. * * @param code the bytecode sequence * @param discardValue discard the result of the evaluation ? */ public void genCode(CodeSequence code, boolean discardValue) { setLineNumber(code); expr.genCode(code, false); if (type == CStdType.Long) { code.plantInstruction(new PushLiteralInstruction((long) -1)); code.plantNoArgInstruction(opc_lxor); } else { code.plantInstruction(new PushLiteralInstruction((int) -1)); code.plantNoArgInstruction(opc_ixor); } if (discardValue) { code.plantPopInstruction(getType()); } }
/** * Generates JVM bytecode to evaluate this expression. * * @param code the bytecode sequence * @param discardValue discard the result of the evaluation ? */ public void genCode(CodeSequence code, boolean discardValue) { setLineNumber(code); expr.genCode(code, false); code.plantInstruction(new PushLiteralInstruction(1)); code.plantNoArgInstruction(opc_ixor); if (discardValue) { code.plantPopInstruction(type); } }