case LENGTH: assert args.length == 1; return genArrayLength(args[0]);
case ZARRAY_LENGTH : case BARRAY_LENGTH : case SARRAY_LENGTH : case CARRAY_LENGTH : case IARRAY_LENGTH : case LARRAY_LENGTH : case FARRAY_LENGTH : case DARRAY_LENGTH : case OARRAY_LENGTH : assert args.length == 2 : args.length; return genArrayLength(args[1]);
    protected byte genPrimitive(Primitive prim,                                Tree[] args,                                byte resType,                                byte expectedType,                                InstrContext ctx) {        switch (prim) {        case POS: case NEG:        case ADD: case SUB: case MUL: case DIV: case MOD:        case NOT: case OR : case XOR: case AND:        case LSL: case LSR: case ASR:            return genArithPrim(prim, args, resType, expectedType, ctx);        case EQ: case NE: case LT: case LE: case GE: case GT:        case ZNOT: case ZOR: case ZAND:            return genCompOrLogicalPrim(prim, args, resType, expectedType, ctx);        case THROW:            assert args.length == 1;            return genThrow(args[0]);        case NEW_ZARRAY :        case NEW_BARRAY :        case NEW_SARRAY :        case NEW_CARRAY :        case NEW_IARRAY :        case NEW_LARRAY :        case NEW_FARRAY :        case NEW_DARRAY :            return genArrayCreate(prim, args[1]);//         case NEW_OARRAY ://             return genArrayCreate(prim, args[1], args[2]);        case ZARRAY_SET : case BARRAY_SET : case SARRAY_SET :        case CARRAY_SET : case IARRAY_SET : case LARRAY_SET :        case FARRAY_SET : case DARRAY_SET : case OARRAY_SET :            assert args.length == 4;            return genArrayUpdate(args[1], args[2], args[3]);        case ZARRAY_GET : case BARRAY_GET : case SARRAY_GET :        case CARRAY_GET : case IARRAY_GET : case LARRAY_GET :        case FARRAY_GET : case DARRAY_GET : case OARRAY_GET :            assert args.length == 3;            return genArrayAccess(args[1], args[2]);        case LENGTH:            assert args.length == 1;            return genArrayLength(args[0]);        case AS_UVALUE :            assert args.length == 1;            gen(args[0], cst.T_VOID);            return cst.T_VOID;        default:            throw Debug.abort("unknown primitive ", prim);        }    }