Commit Graph

74 Commits

Author SHA1 Message Date
R. Bernstein
200250df56 Merge pull request #406 from tangboxuan/master
Fix offset of extended argument instruction
2022-08-24 05:51:41 -04:00
rocky
765b0149ea iftstmt reduce rule for 2.6:
In ifsmt there can be a JUMP_ABSOLUTE right before the endif and a jump
the endif doesn't fall through to the place after the endif.
2022-08-24 05:33:22 -04:00
Bo Xuan
2f3b5e53d4 Add test case 2022-08-24 16:19:39 +08:00
rocky
71b1446c9c Push reducechecks from 2.7 into 2.6
Some adaption is needed. These rules may also help earlier 2.x Python as well
2022-08-23 21:36:55 -04:00
rocky
21b4d52a77 Correct 2.6 erroneous ifelse detection 2022-08-23 16:50:50 -04:00
Bo Xuan
81633b3c1c Fix offset of extended argument instruction 2022-08-23 14:18:31 +08:00
rocky
610f2c827c Remove 3.6-specific iflastsmt reduce check
Fixes #344
2022-07-07 06:54:05 -04:00
rocky
5a4136a7f6 Some limited support for 3.8 "=" specifier 2022-07-06 13:00:52 -04:00
rocky
cc4ea47d24 Use ifelsetmt reduction rule on 2.7 2022-07-04 07:56:44 -04:00
rocky
3490389a66 Correct some Python 2.6 chain compare bugs 2022-03-05 04:03:27 -05:00
rocky
15efaffe8d More Python version tuple comparison conversion 2021-10-16 11:41:22 -04:00
rocky
c68b74a9c6 new dis - Python compisons involving tuples 2021-10-15 23:39:59 -04:00
rocky
024a81c053 Fix condition sense in except_handler.py reduction 2020-07-23 11:03:43 -04:00
rocky
5079164db2 Add reduce check for aug_assign1 2020-07-07 09:54:57 -04:00
rocky
ef59b9c304 Forelse reduction checks on 2.6 2020-07-06 10:09:42 -04:00
rocky
084e183577 Add reduce check for 2.7 except_handler range 2020-07-05 22:18:07 -04:00
rocky
4007b8b702 Back off "or" check using instructions vs opcodes 2020-06-27 11:44:23 -04:00
rocky
598b58796d Back off buggy "or" check 2020-06-27 11:33:46 -04:00
rocky
357f28dd89 Add "comp_if_not" for 2.6- 2020-06-27 11:16:47 -04:00
rocky
5cc572147a Handle more ifelse reduction rules patterns 2020-06-27 09:10:48 -04:00
rocky
02f502c40a New grammar rule often imples expanded reduce rule 2020-06-12 21:12:02 -04:00
rocky
5237d704fa Remove stray debug stmt 2020-04-20 23:13:06 -04:00
rocky
dc7f1ed0cc Final remnants of xdis fixes?
Restore the last of the excluded bytecode.
2020-04-18 23:24:56 -04:00
rocky
e2baccb4e5 Reinstate 3.5 tests 2020-04-18 23:18:24 -04:00
rocky
9ca94717e0 Yet another workaround 2020-04-18 19:53:04 -04:00
rocky
b77efec36c git commit -m'Adjust "or" offset check ...
for Python < 3.6 hopefully it doesn't break Python 3.6+
2020-04-18 19:21:59 -04:00
rocky
17d07eaf00 continuing xdis refactor aftermath...
Both 2.7 bytecode broken from the refactor have now been reinstated, but
two 3.5 and 3.6 bytecode have moved into the "todo" category.
2020-04-18 18:47:06 -04:00
rocky
2fd61b1016 Add 3.7ish "or" check 2020-04-16 16:35:27 -04:00
rocky
badfe5456f Track "or" grammar changes...
Remove re deprecation warning
2020-04-16 15:25:42 -04:00
rocky
874d196e5c 3.x ifelsestmtc reduction rule fix 2020-02-13 05:41:15 -05:00
rocky
8836444be2 Correct ifelsestmtc rules for 3.x 2020-02-09 08:14:44 -05:00
rocky
e2504c2421 3.7 ifelstmtl reduction rule checking 2020-02-08 13:47:05 -05:00
rocky
b0931275a2 Need more precise "assert" for 3.8...
Add rule for ifelsestmtl which is needed in 3.8
2020-02-08 11:46:19 -05:00
rocky
7c73536b4a 3.6 "assert" and "or" handling bugs 2020-02-08 07:27:31 -05:00
rocky
c93a7a728b Add decompyle3 ifelsestmt reduction rule...
and Go over 3.3 and 3.7 runtests excludes
2020-02-07 19:22:23 -05:00
rocky
621bc96e8a Ensure offset is an int in offset test 2020-02-04 20:20:40 -05:00
rocky
610994277c 2.7 ifelsestmt reduction rule futzing 2020-02-02 07:52:08 -05:00
rocky
cf505545c0 3.6 iflastlstmt rule checking again 2020-02-01 12:00:08 -05:00
rocky
451b18ee57 2.7 tryelse rule check disambiguation. 2020-02-01 04:05:50 -05:00
rocky
2d1ea6b02b See previous commit 2020-01-31 21:12:59 -05:00
rocky
f279cc2d70 ifelsesmt for 2.7 yet again 2020-01-31 21:10:24 -05:00
rocky
f27b72ab05 Work around 2.7 phony come-froms in ifelsesmt 2020-01-31 15:49:29 -05:00
rocky
be022b3416 Start ifelsestmt reduce checks in Python 2.7 2020-01-31 13:58:06 -05:00
rocky
e639a30157 Add some decompyle reduction-check goodness here 2020-01-31 12:20:12 -05:00
rocky
33918bd9d2 More 3.x "if" checking. Abbreviate stmts->sstmt 2020-01-26 02:58:33 -05:00
rocky
c90ff5176c Add 3.x try reduction rule 2020-01-24 20:48:04 -05:00
rocky
4067a30573 Fix bug introduced by a recent refactoring 2020-01-24 03:11:51 -05:00
rocky
e76e9b7ab6 ifelsestmt reduce check tracking parse rule change 2020-01-23 20:04:53 -05:00
rocky
eeb48818f3 Largish rework: scan while1stmt for jump out ..
to disambiguate.

For this, we use the self.opc JUMP_OPS sets.
For this, we neeed to store opc in the parse object.

DRY uses of "last = min(last, len(tokens))
2020-01-23 13:02:29 -05:00
rocky
e17d9c806a ifstmt reduction vs extended_args 2020-01-22 19:14:52 -05:00