pypy32.py 690 B

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