Commit Graph

1044 Commits

Author SHA1 Message Date
rocky
c68b74a9c6 new dis - Python compisons involving tuples 2021-10-15 23:39:59 -04:00
Bernd Lörwald
f2f49104ea parsers: parse2: fix: also emit expr32 if count perfectly divisible by 1024
expr1024 requires expr32, but a build_count of 1024 would emit only the
expr1024 rule and rely on luck of it being emitted somewhere else.

Emit expr32 rule either if there is a expr32 use or a expr1024 use to avoid.
2020-12-28 01:42:42 +01:00
rocky
4bbdbe3894 Remove bogus async_with rule 2020-09-10 17:19:13 -04:00
rocky
8879708da7 del_stmt -> delete to match Python AST better 2020-09-02 07:14:56 -04:00
rocky
67c45467c3 little sync with decompyle3
Add another forelsestmt (found only in a loop)
Add precidence on walrus operator
2020-09-01 17:10:33 -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
815ae2c5cd for/else detection for older 2.x Pythons 2020-07-06 18:38:14 -04:00
rocky
54932d36fa Small tweaks...
add-test.py: wasn't handling optimize correctly. Handle python version better
parse27.py: dyslexia
01_for_else_try_else.py: bug in found in 1.4 anydbm.py which we will
address soon
2020-07-06 18:19:06 -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
d357898bbf Towards fixing a 3.8 try except-as bug 2020-06-15 06:03:28 -04:00
rocky
02f502c40a New grammar rule often imples expanded reduce rule 2020-06-12 21:12:02 -04:00
rocky
e14675c2dc Handle 3.7+ "else" branch removal...
As seen in _cmp() of python3.8/distutils/version.py with optimization -O2
2020-06-12 13:18:33 -04:00
rocky
7deeee8502 Push "with" grammar improvements back to 3.6 2020-06-04 05:53:21 -04:00
rocky
9acb3cf068 Fix bug in 3.8 with .. as 2020-06-04 05:24:22 -04:00
rocky
7fa851765d Regularize "or" so args are in 1..2 and ...
correct "return None" semantic action
2020-05-18 22:55:26 -04:00
rocky
d7c3b8454b 3.8 needs call_stmt -> call
Simplify/regularize how "return" works
2020-05-18 22:26:18 -04:00
rocky
4365022f40 Adapt decompyle3's 3.8 try/return grammar rules 2020-05-17 10:18:10 -04:00
rocky
b94c649776 3.7 change rule to match op "or" expr's 2020-05-14 21:32:45 -04:00
rocky
5233a0716b Correct wong class names in super() 2020-05-08 05:59:20 -04:00
rocky
3e1300eb23 Bugs in nested async for...
* Generalize asyc_for rule
 Fix bug in picking out comprehension iterator in async for
* fix bug in getting expression in such a comprehension
* Add %[n]{%x} pattern to template_engine()
2020-04-29 10:12:54 -04:00
rocky
ab6b12be56 Small fixes in fragment parser 2020-04-21 19:58:03 -04:00
rocky
5bd97aa756 lint 2020-04-21 13:49:05 -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
538c2e7efd More regressions with some fixes 2020-04-17 00:06:39 -04:00
rocky
4796fb9e70 "or" rule regularization + regressions from xdis 2020-04-16 23:45:39 -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
e8e7d2086d whileelse in 3.6 sometimes has come froms...
also remove extra "L. " in token printing
2020-04-04 10:12:12 -04:00
rocky
ceb26d29fd 3.5- doesn't do format strings 2020-04-01 10:03:10 -04:00
rocky
a616e1e1c7 "withstmt" -> "with" and fix async for 2020-04-01 09:48:34 -04:00
rocky
e2d349f781 Handle nested async for in for...
and Better async comprehension detection.

Still more work is needed. See commented-out section in
test/simple_source/bug37/02_async_for_generator.py
2020-03-31 12:05:39 -04:00
rocky
2b2e7d3242 Bump xdis and pyenv versions, 2020-03-16 16:44:34 -04:00
rocky
35127452f5 Bug found by 2.4 sre_parse.py testing 2020-02-15 08:06:58 -05:00
rocky
28ef04d141 More bugs found via sre_parse.py decompilation 2020-02-15 05:10:11 -05:00
rocky
fd36c77d2d Bugs found in 2.4 branch testing 2020-02-14 10:54:37 -05:00
rocky
874d196e5c 3.x ifelsestmtc reduction rule fix 2020-02-13 05:41:15 -05:00
rocky
8ac35ad8ce Need to back off ifelsetesting on 2.7...
until we can more fully untangle if stmts in loops.
Current tests break urllib2.pyc and cgi.pyc
2020-02-09 09:01:32 -05:00
rocky
8836444be2 Correct ifelsestmtc rules for 3.x 2020-02-09 08:14:44 -05:00
rocky
5355cb5404 async with rules back to 3.5 and ...
add precidence on cascaded "await" expressions
2020-02-08 20:31:06 -05:00