Correct for pypy 3.7

This commit is contained in:
rocky
2022-04-15 08:32:57 -04:00
parent faac21d1e4
commit 420d22c094
2 changed files with 5 additions and 4 deletions

View File

@@ -32,8 +32,9 @@ JUMP_OPs = opc.JUMP_OPS
class Scanner37(Scanner37Base):
def __init__(self, show_asm=None):
def __init__(self, show_asm=None, is_pypy: bool=False):
Scanner37Base.__init__(self, (3, 7), show_asm)
self.is_pypy = is_pypy
return
pass
@@ -56,7 +57,7 @@ class Scanner37(Scanner37Base):
pass
elif t.op == self.opc.BUILD_MAP_UNPACK_WITH_CALL:
t.kind = "BUILD_MAP_UNPACK_WITH_CALL_%d" % t.attr
elif t.op == self.opc.BUILD_TUPLE_UNPACK_WITH_CALL:
elif not self.is_pypy and t.op == self.opc.BUILD_TUPLE_UNPACK_WITH_CALL:
t.kind = "BUILD_TUPLE_UNPACK_WITH_CALL_%d" % t.attr
pass
return tokens, customize