boolean when) {
boolean when) throws JCode.OffsetTooBigException {
    protected void genCompPrim(Context ctx,                               Primitive prim,                               Tree[] args,                               JCode.Label target,                               boolean when) {        JType maxType = getMaxType(args);        assert !maxType.isReferenceType(): args[0]+" - "+args[1]+" : "+maxType;        int maxTypeIdx = getTypeIndex(maxType);        int intTypeIdx = getTypeIndex(JType.INT);        boolean intCompareWithZero = false;        // Generate code for all arguments, while detecting        // comparisons with 0, which can be optimised.        for (int i = 0; i < args.length; ++i) {            boolean isIntZero = false;            if (maxTypeIdx <= intTypeIdx) {                switch (args[i]) {                case Literal(Object val):                    int intVal;                    if (val instanceof Number)                        intVal = ((Number)val).intValue();                    else if (val instanceof Character)                        intVal = ((Character)val).charValue();                    else if (val instanceof Boolean)                        intVal = ((Boolean)val).booleanValue() ? 1 : 0;                    else                        throw Debug.abort("unknown literal", val);                    if (intVal == 0) {                        isIntZero = true;                        if (i == 0) prim = prim.swap();                    }                }            }            if (intCompareWithZero || !isIntZero)                genLoad(ctx, args[i], maxType);            intCompareWithZero |= isIntZero;        }        if (maxTypeIdx <= intTypeIdx && !intCompareWithZero) {            // Comparison between ints, no zeros involved            switch (maybeNegatedPrim(prim, !when)) {            case LT: ctx.code.emitIF_ICMPLT(target); break;            case LE: ctx.code.emitIF_ICMPLE(target); break;            case EQ: ctx.code.emitIF_ICMPEQ(target); break;            case NE: ctx.code.emitIF_ICMPNE(target); break;            case GE: ctx.code.emitIF_ICMPGE(target); break;            case GT: ctx.code.emitIF_ICMPGT(target); break;            default: throw global.fail("unknown primitive " + prim);            }        } else {            // Comparison between longs, floats or double, or between            // one int and zero.            switch (maxType.getTag()) {            case JType.T_LONG:   ctx.code.emitLCMP();  break;            case JType.T_FLOAT:  ctx.code.emitFCMPG(); break;            case JType.T_DOUBLE: ctx.code.emitDCMPG(); break;            default:                ;               // do nothing (int comparison with 0)            }            switch (maybeNegatedPrim(prim, !when)) {            case LT: ctx.code.emitIFLT(target); break;            case LE: ctx.code.emitIFLE(target); break;            case EQ: ctx.code.emitIFEQ(target); break;            case NE: ctx.code.emitIFNE(target); break;            case GE: ctx.code.emitIFGE(target); break;            case GT: ctx.code.emitIFGT(target); break;            default: throw global.fail("unknown primitive " + prim);            }        }    }