opcode_32.py 851 B

1234567891011121314151617181920212223242526272829
  1. # (C) Copyright 2016-2017, 2020, 2023 by Rocky Bernstein
  2. """
  3. CPython 3.2 bytecode opcodes
  4. This is like Python 3.2's opcode.py with some classification
  5. of stack usage and information for formatting instructions.
  6. """
  7. import xdis.opcodes.opcode_3x as opcode_3x
  8. from xdis.opcodes.base import finalize_opcodes, init_opdata, update_pj3
  9. from xdis.opcodes.opcode_33 import opcode_arg_fmt33, opcode_extended_fmt33
  10. # FIXME: can we DRY this even more?
  11. version_tuple = (3, 2)
  12. python_implementation = "CPython"
  13. loc = locals()
  14. init_opdata(loc, opcode_3x, version_tuple)
  15. # There are no opcodes to add or change because opcode_3x is based on 3.2.
  16. # If there were, they'd be listed below.
  17. opcode_arg_fmt = opcode_arg_fmt32 = opcode_arg_fmt33
  18. opcode_extended_fmt = opcode_extended_fmt32 = opcode_extended_fmt33
  19. update_pj3(globals(), loc)
  20. finalize_opcodes(loc)