From a6de2209fcfce7374c01e398bd0764c76aa9eb40 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Tue, 24 Jan 2023 10:25:10 -0800 Subject: [PATCH] Add simple_const tests for Python 3.8-3.11, and handle Python 3.11 RESUME opcode --- ASTree.cpp | 3 +++ scripts/pymultic | 10 +++++----- tests/compiled/simple_const.3.10.pyc | Bin 0 -> 237 bytes tests/compiled/simple_const.3.11.pyc | Bin 0 -> 280 bytes tests/compiled/simple_const.3.8.pyc | Bin 0 -> 235 bytes tests/compiled/simple_const.3.9.pyc | Bin 0 -> 235 bytes 6 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 tests/compiled/simple_const.3.10.pyc create mode 100644 tests/compiled/simple_const.3.11.pyc create mode 100644 tests/compiled/simple_const.3.8.pyc create mode 100644 tests/compiled/simple_const.3.9.pyc diff --git a/ASTree.cpp b/ASTree.cpp index f86b9c0..1c283a1 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -2516,6 +2516,9 @@ PycRef BuildFromCode(PycRef code, PycModule* mod) that during disassembly/decompilation, we can just treat these as no-ops. */ break; + case Pyc::RESUME_A: + /* Treated as no-op for decompyle purposes */ + break; default: fprintf(stderr, "Unsupported opcode: %s\n", Pyc::OpcodeName(opcode & 0xFF)); cleanBuild = false; diff --git a/scripts/pymultic b/scripts/pymultic index e9eea16..47ef24a 100755 --- a/scripts/pymultic +++ b/scripts/pymultic @@ -30,11 +30,11 @@ PYVERS = { '3.4': '3.4.10', '3.5': '3.5.10', '3.6': '3.6.15', - '3.7': '3.7.15', - '3.8': '3.8.15', - '3.9': '3.9.15', - '3.10': '3.10.8', - '3.11': '3.11.0', + '3.7': '3.7.16', + '3.8': '3.8.16', + '3.9': '3.9.16', + '3.10': '3.10.9', + '3.11': '3.11.1', } OLD_PYTHONS = ('1.0', '1.1', '1.2', '1.3', '1.4', '1.5') diff --git a/tests/compiled/simple_const.3.10.pyc b/tests/compiled/simple_const.3.10.pyc new file mode 100644 index 0000000000000000000000000000000000000000..79aa998f95cddee380548118d44495937a681487 GIT binary patch literal 237 zcmYjKu?_)25Z&3^;|OYrO6L^k2Sg-#jcyYW%(`4~cd@7N1HQr!_ygZEt?D`@Dzh}+ zWZs)Md6~(Y&rZkPF!_3q3+B%3j}?J=Ry0zm^xEz#2+Dy`7RN-VXHRTK&63I;O~ z*2+G|YsmSSYi=`yBxI~lbB_mMuCCE@s#+S@M zs)z+dumXu&%-N}xewysJ7!z+XCf#C8zQvewi!t>UW7;jo^py;sfl3&DN$Bb6XXX`@ zmgpB}<`(3n#wX|J6_@B0RQ}?y$<0qG%}KQ@5&|j&SyOBVBt9@RGBSSPVPIu%V7$S? g4I;SU1P74C%GSZy;09uFbvQM6H!y-=kpNID0M@2OR{#J2 literal 0 HcmV?d00001 diff --git a/tests/compiled/simple_const.3.8.pyc b/tests/compiled/simple_const.3.8.pyc new file mode 100644 index 0000000000000000000000000000000000000000..549125342ad3cdec7d360eb3b92224853f9a45ea GIT binary patch literal 235 zcmYjJI|{-;5Z&3t7{&C0m7TGO7Z4HbZNz3lM4dGRH3`|I@B*H~3wQ(1GOblQOSN*g z5PZYD&+wRK5VQqjcE7G(tPdOhAvsKW&43Ao5(o-VDv6GA&{Zxr(2J#NU=u|G%0qu4 z!d5-xdYoQ*&v(ByRc@(G8Oj>?THBW))DBBwePJCr2YsH0O@a-B&YnS*Sjn=Wt5-EAD=R;j(Xy8&vckv_>B)=k>WGH literal 0 HcmV?d00001 diff --git a/tests/compiled/simple_const.3.9.pyc b/tests/compiled/simple_const.3.9.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b8259c905ed084007225b641da182b05c422cf8 GIT binary patch literal 235 zcmYj}F$%&!5Jh)3YmB1Sf|Z@Ih!+qM>}~88L^QL8U=o8H3oqa)ynr|GEYn)0vs5c5 zg5V$K&HUjr>vp>-ShL$@`Q&-8%)ca?DYqRkP-uam0i~AcXa|*6SVK3Gx`uTWF=!XP zh435YkmFHy?mb@p#*|cHY~jli_*zykeJC9shc6Uw