opcode_23.py 734 B

12345678910111213141516171819202122232425262728
  1. # (C) Copyright 2017, 2019-2021, 2023 by Rocky Bernstein
  2. """
  3. CPython 2.3 bytecode opcodes
  4. This is a like Python 2.3's opcode.py with some additional classification
  5. of stack usage, and opererand formatting functions.
  6. """
  7. import xdis.opcodes.opcode_2x as opcode_2x
  8. from xdis.opcodes.base import (
  9. finalize_opcodes,
  10. init_opdata,
  11. update_pj2,
  12. )
  13. from xdis.opcodes.opcode_2x import update_arg_fmt_base2x, opcode_extended_fmt_base2x
  14. version_tuple = (2, 3)
  15. python_implementation = "CPython"
  16. loc = locals()
  17. init_opdata(loc, opcode_2x, version_tuple)
  18. opcode_arg_fmt = update_arg_fmt_base2x.copy()
  19. opcode_extended_fmt = opcode_extended_fmt12 = opcode_extended_fmt_base2x.copy()
  20. update_pj2(globals(), loc)
  21. finalize_opcodes(loc)