Commit Graph

2043 Commits

Author SHA1 Message Date
rocky
203139eafa Add tests, comment what's up with change..
and use isinstance()
2021-12-31 11:27:15 -05:00
dkw72n
d9de4ea245 Fix #377 2021-12-31 16:11:27 +08:00
rocky
165115289a dict_unmap -> dict_unpack matches Python AST better 2021-12-26 19:03:58 -05:00
rocky
3234673422 mklambda -> lambda_body matches Python AST better
Note: we can't use "lambda" since that is a reserved word
2021-12-26 18:48:51 -05:00
rocky
23551ea70f unmap_dict -> dict_doublestar ...
This matches Python's AST (Dict) better. Variations or specializations
of an AST name, e.g. "unmap" should come at the end, not the beginning.
2021-12-23 22:57:15 -05:00
rocky
30aad42aae Sync with other versions 2021-12-23 16:46:25 -05:00
rocky
a3bc9bb32b Add operator precedence to -T output 2021-12-23 16:11:25 -05:00
rocky
b3aaff0201 Sync pysource with decompyle3 2021-12-18 03:03:50 -05:00
rocky
da2314f5ae Part of the decompye3 loop "continue" fixes 2021-12-17 16:13:09 -05:00
rocky
16c900ff1d Propagate show_asm debug option down to functions 2021-12-17 06:07:18 -05:00
rocky
2c4acecc9d Start PyPy 3.8 support 2021-11-23 16:45:01 -05:00
rocky
223b9e1d88 Extent METHOD_CALL_KW to PyPy 3.8 2021-11-23 07:23:23 -05:00
rocky
211c74c240 Better 3.7 CALL_METHOD_KW handling
- Handles positional args now
2021-11-23 05:06:48 -05:00
rocky
3a63847d22 Tweak last commit 2021-11-22 09:27:16 -05:00
rocky
2ed211e0d4 Some PyPY 3.7 support
* Handle CALL_METHOD_KW
* adjust PyPY 3.7 assert stmts
* misc administrivia
2021-11-21 14:04:34 -05:00
rocky
d752f63d12 PyPy 3.7 scanner bug 2021-11-21 00:06:45 -05:00
rocky
69387c4173 Tidy scanner more 2021-11-03 05:03:53 -04:00
rocky
22baad273f Sync with decompyle start using types more. 2021-11-03 04:58:41 -04:00
rocky
8094f3bb12 Remove PYTHON3 2021-11-03 03:00:43 -04:00
rocky
f6f0e344d0 Python 3.6+ specialization 2021-11-03 02:23:19 -04:00
rocky
ed34bf9d4a use xdis.PYTHON3 not uncompyle.PYTHON3 2021-11-02 06:53:11 -04:00
rocky
7fd1cea877 Start PyPY 3.7 and 3.8 decompilation support 2021-11-02 06:05:09 -04:00
rocky
4911d85237 Get ready for release 3.8.0 2021-10-29 22:17:17 -04:00
rocky
32c4b84458 Better handling of bytecode errors 2021-10-28 18:37:54 -04:00
rocky
d0ca7b0363 Loosen check to allow running from 2.4-3.10
We still only can *decompile* 2.4-3.8
2021-10-26 06:21:51 -04:00
rocky
ea26084e6d Modernize and sync with decompyle3 better 2021-10-25 09:13:47 -04:00
rocky
fa203af665 Better messages when xdis not handling Python x.y 2021-10-24 23:22:41 -04:00
rocky
51ac72ba1f Sync with decompile3 2021-10-24 01:52:23 -04:00
rocky
d5bf7626af Fix bug in fragment parser 2021-10-24 01:32:41 -04:00
rocky
7387e5094b More version tuple conversions 2021-10-23 15:54:14 -04:00
rocky
1bcd21a6f4 More version conversion bugs 2021-10-23 10:04:58 -04:00
rocky
71fe1e6c2c Fragment and other bugs
Part of the upgrade process
2021-10-23 09:47:30 -04:00
rocky
e3369edaed DRY using version_info_to_str 2021-10-23 08:24:35 -04:00
rocky
29a91fc015 Version twiddling 2021-10-21 16:33:09 -04:00
rocky
41314f95bb More Python version comparison adjustments 2021-10-19 16:30:56 -04:00
rocky
0645738775 Revise Python version comparisions
And set scanner.show_asm for 3.6
2021-10-19 05:54:54 -04:00
rocky
ceb7c659bd Python version comparison adjustments 2021-10-18 12:23:53 -04:00
rocky
8ac7a75372 Use tuples not floats in Python release comparison 2021-10-18 11:59:02 -04:00
rocky
15efaffe8d More Python version tuple comparison conversion 2021-10-16 11:41:22 -04:00
rocky
e8e006bb8c More Python version comparison conversions 2021-10-16 11:33:03 -04:00
rocky
c68b74a9c6 new dis - Python compisons involving tuples 2021-10-15 23:39:59 -04:00
rocky
184bda1b03 Work around broken modularity in python_parser 2021-08-27 02:13:09 -04:00
rocky
f374485e93 Another fragment fix for 3.8 2021-07-29 14:23:17 -04:00
rocky
fe7df87288 Sync 3.8 and Makefile changes with decompyle3
Makefile: pyston 2.3 tolerance
fragments: 3.8 comprehension adjustments
2021-07-29 13:16:03 -04:00
rocky
cfbb25df3d Fix some small bugs 2021-07-08 05:40:43 -04:00
rocky
d4174832a1 Black shouldn't format version.py 2021-06-23 11:46:31 -04:00
rocky
96b1e435c2 Fixes #360 2021-06-15 22:42:55 -04:00
Renat Iliev
2b154e0b88 'NoneType' object is not iterable with numproc > 1
main calls with source_paths=None, but it needs to be iterable
2021-06-14 19:50:18 +03:00
rocky
5c16c73a6c Fix annotation transform for 3.7+
We were producing:

```
z: z: int = 5 on bytecode_3.7_run/02_var_annotate.pyc
```

because grammar went

     5. sstmt
        ann_assign (4) transformed by n_stmts: ('%|%[2]{attr}: %c\n', 0)
             0. ann_assign_init (3): ('%|%[2]{attr}: %c = %c\n', 0, 1)

The "ann_assign" added "z:". Instead we have now:

```
     5. sstmt
        ann_assign_init (3) transformed by n_stmts: ('%|%[2]{attr}: %c = %c\n', 0, 1)
```

Also, in the previous statement which appears in the listing (but is not
actually in the finaly tree) we had:

     4. sstmt
        assign (2): ('%|%c = %p\n', -1, (0, 200))
             0. expr
                L. L.   7        26  LOAD_CONST               5
             1. store

So we now preface the node type with "deleted", e.g.:

     4. deleted sstmt
        assign (2): ('%|%c = %p\n', -1, (0, 200))
             0. expr
                L. L.   7        26  LOAD_CONST               5
             1. store

to reduce confusion
2020-12-27 22:50:46 -05: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