public short getIntValue() {
        short result;
        switch (code) {
            case iconst_0:
                result = 0; break;
            case iconst_1:
                result = 1; break;
            case iconst_2:
                result = 2; break;
            case iconst_3:
                result = 3; break;
            case iconst_4:
                result = 4; break;
            case iconst_5:
                result = 5; break;
            case iconst_m1:
                result = -1; break;
            case bipush:
            case sipush:
                result = val; break;
            default:
                throw new IllegalArgumentException("Wrong instruction code:" + code);
        }
        return result;
    }