private int parseWide(int offset, Visitor visitor) {
    int opcode = bytes.getUnsignedByte(offset + 1);
    int idx = bytes.getUnsignedShort(offset + 2);
    switch (opcode) {
      case ByteOps.ILOAD:
        {
          visitor.visitLocal(ByteOps.ILOAD, offset, 4, idx, Type.INT, 0);
          return 4;
        }
      case ByteOps.LLOAD:
        {
          visitor.visitLocal(ByteOps.ILOAD, offset, 4, idx, Type.LONG, 0);
          return 4;
        }
      case ByteOps.FLOAD:
        {
          visitor.visitLocal(ByteOps.ILOAD, offset, 4, idx, Type.FLOAT, 0);
          return 4;
        }
      case ByteOps.DLOAD:
        {
          visitor.visitLocal(ByteOps.ILOAD, offset, 4, idx, Type.DOUBLE, 0);
          return 4;
        }
      case ByteOps.ALOAD:
        {
          visitor.visitLocal(ByteOps.ILOAD, offset, 4, idx, Type.OBJECT, 0);
          return 4;
        }
      case ByteOps.ISTORE:
        {
          visitor.visitLocal(ByteOps.ISTORE, offset, 4, idx, Type.INT, 0);
          return 4;
        }
      case ByteOps.LSTORE:
        {
          visitor.visitLocal(ByteOps.ISTORE, offset, 4, idx, Type.LONG, 0);
          return 4;
        }
      case ByteOps.FSTORE:
        {
          visitor.visitLocal(ByteOps.ISTORE, offset, 4, idx, Type.FLOAT, 0);
          return 4;
        }
      case ByteOps.DSTORE:
        {
          visitor.visitLocal(ByteOps.ISTORE, offset, 4, idx, Type.DOUBLE, 0);
          return 4;
        }
      case ByteOps.ASTORE:
        {
          visitor.visitLocal(ByteOps.ISTORE, offset, 4, idx, Type.OBJECT, 0);
          return 4;
        }
      case ByteOps.RET:
        {
          visitor.visitLocal(opcode, offset, 4, idx, Type.RETURN_ADDRESS, 0);
          return 4;
        }
      case ByteOps.IINC:
        {
          int value = bytes.getShort(offset + 4);
          visitor.visitLocal(opcode, offset, 6, idx, Type.INT, value);
          return 6;
        }
      default:
        {
          visitor.visitInvalid(ByteOps.WIDE, offset, 1);
          return 1;
        }
    }
  }
Helper to deal with {@code wide}.

@param offset the offset to the {@code wide} opcode itself
@param visitor {@code non-null;} visitor to use
@return instruction length, in bytes
android/android_framework/dex-maker/src/main/java/com/android/dx/cf/code/BytecodeArray.java