From 9e815d8d794cfec435ea3d6893541b59893a05c3 Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 4 Mar 2018 21:42:59 -0500 Subject: [PATCH] 2.6 and before COME_FROM handling... also, add in some of the test bytecode from the python-2.4 branch --- test/bytecode_2.5/01_inplace_true_divide.pyc | Bin 0 -> 249 bytes test/bytecode_2.5/01_ops.pyc | Bin 0 -> 345 bytes test/bytecode_2.5/02_true_divide.pyc | Bin 0 -> 238 bytes test/bytecode_2.5/08_if_while_else.pyc | Bin 0 -> 428 bytes test/bytecode_2.5/10_del.pyc | Bin 0 -> 836 bytes test/simple_source/bug25/08_if_while_else.py | 13 +++++++++++++ uncompyle6/parsers/parse26.py | 3 +-- uncompyle6/scanners/scanner2.py | 8 +++++++- 8 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 test/bytecode_2.5/01_inplace_true_divide.pyc create mode 100644 test/bytecode_2.5/01_ops.pyc create mode 100644 test/bytecode_2.5/02_true_divide.pyc create mode 100644 test/bytecode_2.5/08_if_while_else.pyc create mode 100644 test/bytecode_2.5/10_del.pyc create mode 100644 test/simple_source/bug25/08_if_while_else.py diff --git a/test/bytecode_2.5/01_inplace_true_divide.pyc b/test/bytecode_2.5/01_inplace_true_divide.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ce7c8daa2300c6cce4e22f1c262889ac98dcdd4d GIT binary patch literal 249 zcmYLDO9}!p3{7W7kU_x%D7YL19TnV(cmfx?b5nF0rP%o}ZAI5Ey^P?^ynrSm7()79 zUedhhs~z7T-E9WH2fB=4v4Ih2KQqsQXahXHA=ZA298e}EWSIWX+w(RUoHvj|6+$kt8A?}slzds?sJdGAG0#io4KCP*WuG0<5+B{cHFE#} literal 0 HcmV?d00001 diff --git a/test/bytecode_2.5/01_ops.pyc b/test/bytecode_2.5/01_ops.pyc new file mode 100644 index 0000000000000000000000000000000000000000..569dc0eb6423b3a403833581c855c56185e229d9 GIT binary patch literal 345 zcmY+Ay9&ZE6o&sat=58rgHAfQ6$CFh2r42tdRg4M6l{VDN{g|eZ{fT6W>NjTNFZQuV_~sa7_k=d1Qyz**&;i_;^xDCB-UQQOLzir<^^;{1c%|x z=gs5I^Ht=Jdr{T!i0pg714*Kxt026Y@wIp5*XkD2-l#s zAwMOvw&V}UypAXm`F#jDGBUXRZfLnjMsT;hf@DQ%2Y;TZp4Om6$dZWMNr>A9X?EN~ zb-PL&MY_DN1FKJU7r9Y=QTy^a_Th-GVV~j{B`Jjws^FTg<|6pCDtWR%SPa9vQn$P6F HL1z5`jFL?8 literal 0 HcmV?d00001 diff --git a/test/bytecode_2.5/10_del.pyc b/test/bytecode_2.5/10_del.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d7edcefa2befec90812df35238b4149672f293da GIT binary patch literal 836 zcmb7ByG{c!5FFdNI|ziN;87rfM8j2tX9oz0K1I?U1xjKQA|)KcM-e2b;Ad$0B7T7n zAnZ6i1ft1FJG<-Kot?E`-YVtSi_NTy&o2>wBIch3>;f|2OacR2f{oBK$P}D{1&+k+ z+6sD-#aPS?oRlTlvori{3y zgqnwqfT7x@lH&*bx};lm-ydEN+_}$hZ@RATi(%pGJKN{h4YsaF1@&Cy`HDDCfiPhv zslR6~OCk&3PbO<_CvlL#_C{E*`_)3<5(`ovWS@Ve-u 2.6 or + self.code[source] != self.opc.SETUP_LOOP or + self.code[label] != self.opc.JUMP_FORWARD): + targets[label] = targets.get(label, []) + [source] pass pass pass