pypy38.py 686 B

12345678910111213141516171819202122232425
  1. # Copyright (c) 2021 by Rocky Bernstein
  2. """
  3. Python PyPy 3.8 decompiler scanner.
  4. Does some additional massaging of xdis-disassembled instructions to
  5. make things easier for decompilation.
  6. """
  7. import decompyle3.scanners.scanner38 as scan
  8. # bytecode verification, verify(), uses JUMP_OPS from here
  9. from xdis.opcodes import opcode_38pypy as opc
  10. JUMP_OPs = opc.JUMP_OPS
  11. # We base this off of 3.8
  12. class ScannerPyPy38(scan.Scanner38):
  13. def __init__(self, show_asm):
  14. # There are no differences in initialization between
  15. # pypy 3.8 and 3.8
  16. scan.Scanner38.__init__(self, show_asm, is_pypy=True)
  17. self.version = (3, 8)
  18. self.opc = opc
  19. return