pypy36.py 675 B

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