opcodes_generator.py: (un)serializeXXX should be static methods.