@classmethod
    def read(cls, reader, dump=None):
        code = reader.read_u1()
        # Create an index of all known opcodes.
        if Opcode.opcodes is None:
            Opcode.opcodes = {}
            for name in globals():
                klass = globals()[name]
                try:
                    if name != 'Opcode' and issubclass(klass, Opcode):
                        Opcode.opcodes[klass.code] = klass
                except __HOLE__:
                    pass
        instance = Opcode.opcodes[code].read_extra(reader, dump)
        if dump:
            reader.debug("    " * dump, '%3d: %s' % (reader.offset, instance))
        return instance
dataset/ETHPy150Open pybee/voc/voc/java/opcodes.py/Opcode.read