diff --git a/test/bytecode_pypy_2.6.1/00_assign.pyc b/test/bytecode_pypy2.7/00_assign.pyc similarity index 100% rename from test/bytecode_pypy_2.6.1/00_assign.pyc rename to test/bytecode_pypy2.7/00_assign.pyc diff --git a/test/bytecode_pypy_2.6.1/00_import.pyc b/test/bytecode_pypy2.7/00_import.pyc similarity index 100% rename from test/bytecode_pypy_2.6.1/00_import.pyc rename to test/bytecode_pypy2.7/00_import.pyc diff --git a/test/bytecode_pypy_2.6.1/00_pass.pyc b/test/bytecode_pypy2.7/00_pass.pyc similarity index 100% rename from test/bytecode_pypy_2.6.1/00_pass.pyc rename to test/bytecode_pypy2.7/00_pass.pyc diff --git a/test/bytecode_pypy_2.6.1/01_boolean.pyc b/test/bytecode_pypy2.7/01_boolean.pyc similarity index 100% rename from test/bytecode_pypy_2.6.1/01_boolean.pyc rename to test/bytecode_pypy2.7/01_boolean.pyc diff --git a/test/bytecode_pypy_2.6.1/01_class.pyc b/test/bytecode_pypy2.7/01_class.pyc similarity index 100% rename from test/bytecode_pypy_2.6.1/01_class.pyc rename to test/bytecode_pypy2.7/01_class.pyc diff --git a/test/bytecode_pypy_2.6.1/01_list_comprehension.pyc b/test/bytecode_pypy2.7/01_list_comprehension.pyc similarity index 100% rename from test/bytecode_pypy_2.6.1/01_list_comprehension.pyc rename to test/bytecode_pypy2.7/01_list_comprehension.pyc diff --git a/test/bytecode_pypy_2.6.1/01_positional.pyc b/test/bytecode_pypy2.7/01_positional.pyc similarity index 100% rename from test/bytecode_pypy_2.6.1/01_positional.pyc rename to test/bytecode_pypy2.7/01_positional.pyc diff --git a/test/bytecode_pypy_2.6.1/01_try_except.pyc b/test/bytecode_pypy2.7/01_try_except.pyc similarity index 100% rename from test/bytecode_pypy_2.6.1/01_try_except.pyc rename to test/bytecode_pypy2.7/01_try_except.pyc diff --git a/test/bytecode_pypy3.2/00_assign.pyc b/test/bytecode_pypy3.2/00_assign.pyc new file mode 100644 index 00000000..d672bcdc Binary files /dev/null and b/test/bytecode_pypy3.2/00_assign.pyc differ diff --git a/test/bytecode_pypy3.2/00_import.pyc b/test/bytecode_pypy3.2/00_import.pyc new file mode 100644 index 00000000..52b762fe Binary files /dev/null and b/test/bytecode_pypy3.2/00_import.pyc differ diff --git a/test/bytecode_pypy3.2/00_pass.pyc b/test/bytecode_pypy3.2/00_pass.pyc new file mode 100644 index 00000000..d1f323cf Binary files /dev/null and b/test/bytecode_pypy3.2/00_pass.pyc differ diff --git a/test/bytecode_pypy3.2/01_boolean.pyc b/test/bytecode_pypy3.2/01_boolean.pyc new file mode 100644 index 00000000..2ed63829 Binary files /dev/null and b/test/bytecode_pypy3.2/01_boolean.pyc differ diff --git a/test/bytecode_pypy3.2/01_class.pyc b/test/bytecode_pypy3.2/01_class.pyc new file mode 100644 index 00000000..5f4bd3ae Binary files /dev/null and b/test/bytecode_pypy3.2/01_class.pyc differ diff --git a/test/bytecode_pypy3.2/01_fns.pyc b/test/bytecode_pypy3.2/01_fns.pyc new file mode 100644 index 00000000..80b5337b Binary files /dev/null and b/test/bytecode_pypy3.2/01_fns.pyc differ diff --git a/test/bytecode_pypy3.2/01_list_comprehension.pyc b/test/bytecode_pypy3.2/01_list_comprehension.pyc new file mode 100644 index 00000000..70e3e347 Binary files /dev/null and b/test/bytecode_pypy3.2/01_list_comprehension.pyc differ diff --git a/test/bytecode_pypy3.2/01_positional.pyc b/test/bytecode_pypy3.2/01_positional.pyc new file mode 100644 index 00000000..f3e46b40 Binary files /dev/null and b/test/bytecode_pypy3.2/01_positional.pyc differ diff --git a/test/bytecode_pypy3.2/01_try_except.pyc b/test/bytecode_pypy3.2/01_try_except.pyc new file mode 100644 index 00000000..737d6ff0 Binary files /dev/null and b/test/bytecode_pypy3.2/01_try_except.pyc differ diff --git a/test/bytecode_pypy3.2/02_closure.pyc b/test/bytecode_pypy3.2/02_closure.pyc new file mode 100644 index 00000000..cf94fdad Binary files /dev/null and b/test/bytecode_pypy3.2/02_closure.pyc differ diff --git a/test/bytecode_pypy3.2/02_complex.pyc b/test/bytecode_pypy3.2/02_complex.pyc new file mode 100644 index 00000000..a7a35ae7 Binary files /dev/null and b/test/bytecode_pypy3.2/02_complex.pyc differ diff --git a/test/bytecode_pypy3.2/02_def.pyc b/test/bytecode_pypy3.2/02_def.pyc new file mode 100644 index 00000000..ff6523ea Binary files /dev/null and b/test/bytecode_pypy3.2/02_def.pyc differ diff --git a/test/bytecode_pypy3.2/02_slice.pyc b/test/bytecode_pypy3.2/02_slice.pyc new file mode 100644 index 00000000..4e443ffa Binary files /dev/null and b/test/bytecode_pypy3.2/02_slice.pyc differ diff --git a/test/bytecode_pypy3.2/05_3x_set_comphension.pyc b/test/bytecode_pypy3.2/05_3x_set_comphension.pyc new file mode 100644 index 00000000..e42c8d23 Binary files /dev/null and b/test/bytecode_pypy3.2/05_3x_set_comphension.pyc differ diff --git a/test/bytecode_pypy3.2/05_abc_class.pyc-notyet b/test/bytecode_pypy3.2/05_abc_class.pyc-notyet new file mode 100644 index 00000000..e26ef8f3 Binary files /dev/null and b/test/bytecode_pypy3.2/05_abc_class.pyc-notyet differ diff --git a/test/bytecode_pypy3.2/05_class.pyc b/test/bytecode_pypy3.2/05_class.pyc new file mode 100644 index 00000000..b16ec671 Binary files /dev/null and b/test/bytecode_pypy3.2/05_class.pyc differ diff --git a/test/bytecode_pypy3.2/05_closure_bug.pyc b/test/bytecode_pypy3.2/05_closure_bug.pyc new file mode 100644 index 00000000..c628afc0 Binary files /dev/null and b/test/bytecode_pypy3.2/05_closure_bug.pyc differ diff --git a/test/bytecode_pypy3.2/05_const_map.pyc-notyet b/test/bytecode_pypy3.2/05_const_map.pyc-notyet new file mode 100644 index 00000000..40ccfd72 Binary files /dev/null and b/test/bytecode_pypy3.2/05_const_map.pyc-notyet differ diff --git a/test/bytecode_pypy3.2/05_dup_top_two.pyc b/test/bytecode_pypy3.2/05_dup_top_two.pyc new file mode 100644 index 00000000..d47238d3 Binary files /dev/null and b/test/bytecode_pypy3.2/05_dup_top_two.pyc differ diff --git a/test/bytecode_pypy3.2/05_for_for.pyc b/test/bytecode_pypy3.2/05_for_for.pyc new file mode 100644 index 00000000..af671ebf Binary files /dev/null and b/test/bytecode_pypy3.2/05_for_for.pyc differ diff --git a/test/bytecode_pypy3.2/05_for_try_except.pyc b/test/bytecode_pypy3.2/05_for_try_except.pyc new file mode 100644 index 00000000..ee3826d2 Binary files /dev/null and b/test/bytecode_pypy3.2/05_for_try_except.pyc differ diff --git a/test/bytecode_pypy3.2/05_if.pyc b/test/bytecode_pypy3.2/05_if.pyc new file mode 100644 index 00000000..fc96aed4 Binary files /dev/null and b/test/bytecode_pypy3.2/05_if.pyc differ diff --git a/test/bytecode_pypy3.2/05_if_assign.pyc b/test/bytecode_pypy3.2/05_if_assign.pyc new file mode 100644 index 00000000..8b59caab Binary files /dev/null and b/test/bytecode_pypy3.2/05_if_assign.pyc differ diff --git a/test/bytecode_pypy3.2/05_ifelse.pyc b/test/bytecode_pypy3.2/05_ifelse.pyc new file mode 100644 index 00000000..e55699a1 Binary files /dev/null and b/test/bytecode_pypy3.2/05_ifelse.pyc differ diff --git a/test/bytecode_pypy3.2/05_list_comprehension.pyc b/test/bytecode_pypy3.2/05_list_comprehension.pyc new file mode 100644 index 00000000..1fe58227 Binary files /dev/null and b/test/bytecode_pypy3.2/05_list_comprehension.pyc differ diff --git a/test/bytecode_pypy3.2/05_long_list.pyc b/test/bytecode_pypy3.2/05_long_list.pyc new file mode 100644 index 00000000..1ac535b8 Binary files /dev/null and b/test/bytecode_pypy3.2/05_long_list.pyc differ diff --git a/test/bytecode_pypy3.2/05_set_comprehension.pyc b/test/bytecode_pypy3.2/05_set_comprehension.pyc new file mode 100644 index 00000000..ebc7ac89 Binary files /dev/null and b/test/bytecode_pypy3.2/05_set_comprehension.pyc differ diff --git a/test/bytecode_pypy3.2/05_static_method.pyc b/test/bytecode_pypy3.2/05_static_method.pyc new file mode 100644 index 00000000..7c119bd6 Binary files /dev/null and b/test/bytecode_pypy3.2/05_static_method.pyc differ diff --git a/test/bytecode_pypy3.2/05_store_locals.pyc b/test/bytecode_pypy3.2/05_store_locals.pyc new file mode 100644 index 00000000..3853143e Binary files /dev/null and b/test/bytecode_pypy3.2/05_store_locals.pyc differ diff --git a/test/bytecode_pypy3.2/05_try_except.pyc b/test/bytecode_pypy3.2/05_try_except.pyc new file mode 100644 index 00000000..7ef67afd Binary files /dev/null and b/test/bytecode_pypy3.2/05_try_except.pyc differ diff --git a/test/bytecode_pypy3.2/05_try_finally_pass.pyc b/test/bytecode_pypy3.2/05_try_finally_pass.pyc new file mode 100644 index 00000000..1c46fac0 Binary files /dev/null and b/test/bytecode_pypy3.2/05_try_finally_pass.pyc differ diff --git a/test/bytecode_pypy3.2/05_with.pyc b/test/bytecode_pypy3.2/05_with.pyc new file mode 100644 index 00000000..7e565266 Binary files /dev/null and b/test/bytecode_pypy3.2/05_with.pyc differ diff --git a/test/bytecode_pypy3.2/06_classbug.pyc b/test/bytecode_pypy3.2/06_classbug.pyc new file mode 100644 index 00000000..d62cfe74 Binary files /dev/null and b/test/bytecode_pypy3.2/06_classbug.pyc differ diff --git a/test/bytecode_pypy3.2/06_for_break.pyc b/test/bytecode_pypy3.2/06_for_break.pyc new file mode 100644 index 00000000..6ff4d624 Binary files /dev/null and b/test/bytecode_pypy3.2/06_for_break.pyc differ diff --git a/test/bytecode_pypy3.2/06_frozenset.pyc b/test/bytecode_pypy3.2/06_frozenset.pyc new file mode 100644 index 00000000..f299f354 Binary files /dev/null and b/test/bytecode_pypy3.2/06_frozenset.pyc differ diff --git a/test/bytecode_pypy3.2/06_ifTrue_optimize_bug.pyc b/test/bytecode_pypy3.2/06_ifTrue_optimize_bug.pyc new file mode 100644 index 00000000..d4a9ae15 Binary files /dev/null and b/test/bytecode_pypy3.2/06_ifTrue_optimize_bug.pyc differ diff --git a/test/bytecode_pypy3.2/06_list_ifnot.pyc b/test/bytecode_pypy3.2/06_list_ifnot.pyc new file mode 100644 index 00000000..411e5dc2 Binary files /dev/null and b/test/bytecode_pypy3.2/06_list_ifnot.pyc differ diff --git a/test/bytecode_pypy3.2/06_list_ifnot_and.pyc-notyet b/test/bytecode_pypy3.2/06_list_ifnot_and.pyc-notyet new file mode 100644 index 00000000..a80f3f11 Binary files /dev/null and b/test/bytecode_pypy3.2/06_list_ifnot_and.pyc-notyet differ diff --git a/test/bytecode_pypy3.2/06_return_bug.pyc b/test/bytecode_pypy3.2/06_return_bug.pyc new file mode 100644 index 00000000..d7a95518 Binary files /dev/null and b/test/bytecode_pypy3.2/06_return_bug.pyc differ diff --git a/test/bytecode_pypy3.2/06_setif_comprehension.pyc-notyet b/test/bytecode_pypy3.2/06_setif_comprehension.pyc-notyet new file mode 100644 index 00000000..b708b743 Binary files /dev/null and b/test/bytecode_pypy3.2/06_setif_comprehension.pyc-notyet differ diff --git a/test/bytecode_pypy3.2/06_tryifelse.pyc-notyet b/test/bytecode_pypy3.2/06_tryifelse.pyc-notyet new file mode 100644 index 00000000..f5694f3c Binary files /dev/null and b/test/bytecode_pypy3.2/06_tryifelse.pyc-notyet differ diff --git a/uncompyle6/scanner.py b/uncompyle6/scanner.py index e936abf3..1c71aed4 100755 --- a/uncompyle6/scanner.py +++ b/uncompyle6/scanner.py @@ -53,7 +53,7 @@ class Scanner(object): self.show_asm = show_asm if version in PYTHON_VERSIONS: - if is_pypy: + if is_pypy and version != 3.2: v_str = "opcode_pypy%s" % (int(version * 10)) else: v_str = "opcode_%s" % (int(version * 10)) diff --git a/uncompyle6/scanners/scanner3.py b/uncompyle6/scanners/scanner3.py index d7e1c9b9..8768962a 100644 --- a/uncompyle6/scanners/scanner3.py +++ b/uncompyle6/scanners/scanner3.py @@ -46,8 +46,8 @@ import uncompyle6.scanner as scan class Scanner3(scan.Scanner): - def __init__(self, version, show_asm=None): - super(Scanner3, self).__init__(version, show_asm) + def __init__(self, version, show_asm=None, is_pypy=False): + super(Scanner3, self).__init__(version, show_asm, is_pypy) # Create opcode classification sets # Note: super initilization above initializes self.opc diff --git a/uncompyle6/scanners/scanner32.py b/uncompyle6/scanners/scanner32.py index bc82fafe..eaca97b1 100644 --- a/uncompyle6/scanners/scanner32.py +++ b/uncompyle6/scanners/scanner32.py @@ -15,8 +15,8 @@ JUMP_OPs = map(lambda op: opc.opname[op], opc.hasjrel + opc.hasjabs) from uncompyle6.scanners.scanner3 import Scanner3 class Scanner32(Scanner3): - def __init__(self, show_asm=None): - Scanner3.__init__(self, 3.2, show_asm) + def __init__(self, show_asm=None, is_pypy=False): + Scanner3.__init__(self, 3.2, show_asm, is_pypy) return pass