boolean when) {
boolean when) throws JCode.OffsetTooBigException {
    protected void genCond(Context ctx,                           Tree tree,                           JCode.Label target,                           boolean when) {        switch (tree) {        case Apply(Tree fun, Tree[] args):            if (isKnownPrimitive(fun.symbol())) {                Primitive prim = prims.getPrimitive(fun.symbol());                Tree[] allArgs = extractPrimitiveArgs((Tree.Apply)tree);                switch (prim) {                case ID: case EQ: case NE:                    assert allArgs.length == 2;                    Tree unbox1 = unbox(allArgs[0]);                    Tree unbox2 = unbox(allArgs[1]);                    if (!getMaxType(unbox1, unbox2).isReferenceType()) {                        allArgs[0] = unbox1;                        allArgs[1] = unbox2;                        genCompPrim(ctx, prim, allArgs, target, when);                    } else {                        genEqPrim(ctx, prim, allArgs, target, when);                    }                    return;                case LT: case LE: case GE: case GT:                    assert allArgs.length == 2;                    allArgs[0] = unbox(allArgs[0]);                    genCompPrim(ctx, prim, allArgs, target, when);                    return;                case ZNOT:                    assert allArgs.length == 1;                    genCond(ctx, unbox(allArgs[0]), target, !when);                    return;                case ZOR:                case ZAND:                    if (when ^ (prim == Primitive.ZAND)) {                        // x || y jump if true  -or-  x && y jump if false                        genCond(ctx, unbox(allArgs[0]), target, when);                        genCond(ctx, allArgs[1], target, when);                    } else {                        // x || y jump if false  -or-  x && y jump if true                        JCode.Label afterLabel = ctx.code.newLabel();                        genCond(ctx, unbox(allArgs[0]), afterLabel, !when);                        genCond(ctx, allArgs[1], target, when);                        afterLabel.anchorToNext();                    }                    return;                }            }        }        // Default case: the condition is not a comparison or logical        // primitive.        genLoad(ctx, tree, JType.BOOLEAN);        if (when)            ctx.code.emitIFNE(target);        else            ctx.code.emitIFEQ(target);    }