Commit Graph

49 Commits

Author SHA1 Message Date
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
fa203af665 Better messages when xdis not handling Python x.y 2021-10-24 23:22:41 -04:00
rocky
5fde4f2e05 Show token number in parser error listing...
But only if -g is given
2020-03-31 10:12:52 -04:00
rocky
4067a30573 Fix bug introduced by a recent refactoring 2020-01-24 03:11:51 -05:00
rocky
28a80a0132 3.6+ extended arg handling; sync with decompyle3..
Use 3.8 scanner now.

TODO: Need to investigate what's up with 3.7/01_extended_arg.py
2020-01-23 13:35:22 -05:00
rocky
018583069b 3.7+ bug in handling extended arg 2020-01-22 14:31:45 -05:00
rocky
5d64664857 Python 2.6.9 compatibility 2020-01-22 06:27:31 -05:00
rocky
bc50825460 Conditional jumps to extended-arg JUMP_BACK...
this is a major reworking. But it leads the way forward to a
simpler grammar.
2020-01-22 05:32:27 -05:00
rocky
c6ddefcef5 Merging in recent 3.7 and 3.8 improvements from decompyle6
This rebases 3.7, 3.8 ...decompilation off of 3.7ish rather than a 3.4
base.

Add more 3.7 and 3.8 tests
2019-12-08 17:54:59 -05:00
rocky
24afe072b7 LOAD_CONST -> LOAD_CODE where appropriate 2019-06-19 14:43:07 -04:00
rocky
002720988c Formatting in < 3.0 is different for name ops 2019-06-11 14:08:50 -04:00
rocky
08f23567a6 Nicer assembly display...
Fewer extraneous quotes and remove pattrs that don't mean anything.
Base more on OP poperties like varargs and NAME_OPS
2019-06-11 12:44:29 -04:00
rocky
5981c7eae9 Fix LOAD_STR messing up docstring comparision 2019-06-11 10:33:49 -04:00
rocky
9811c5bc42 Nicer assembly output 2019-06-09 12:21:45 -04:00
rocky
fd5f4fa5b8 Nicer LOAD_STR assembly output 2019-06-09 09:53:21 -04:00
rocky
9b550b9dda PEP E225 with a nod to Deepcommit 2019-04-14 06:11:16 -04:00
cclauss
6cbaef4ba5 Travis CI: Run more f-string tests on Python 3.7 2019-01-12 20:24:08 +01:00
rocky
f7439f506a Fix 3.6 MAKE_FUNCTION for kw params...
and remove duplicated attributies in pattr of MAKE_FUNCITON token.
2018-03-01 07:14:46 -05:00
rocky
e23315b2e6 Fallout from more precise token attributes 2018-02-28 23:35:52 -05:00
rocky
413df51dfa Token.format(), shows CONST values better...
We were not showing the proper value for None, or False.

Start a unit test for Token().

I think this cleans the Token class up a little more.

More work is needed for MAKE_FUNCTION...

Note: Some debug stuff is commented out in make_funciton.py for upcoming work.
2018-02-28 22:05:12 -05:00
rocky
c43c9a19aa Move to GPL3 license 2018-02-27 06:40:36 -05:00
rocky
6aa4376fca Fix another 2.5- try/else (in loop) bug 2018-01-07 08:44:54 -05:00
rocky
1392b18bd7 Adjust for spark-parser 2.7.0 incompatabilities 2017-10-10 14:14:26 -04:00
rocky
5bef5683e4 Match Python 3.4's terms a little names better 2017-09-10 00:48:54 -04:00
rocky
4e1467adc8 Revert last revert 2017-09-09 08:08:40 -04:00
rocky
7cdf0abb43 Revert last change 2017-09-09 08:03:04 -04:00
rocky
9b336251a7 New-style Python classes only, please. 2017-09-09 07:47:21 -04:00
rocky
27ab6fe2f5 Use xdis 3.5.0's opcode sets 2017-07-08 20:41:46 -04:00
rocky
39814fab8b Misc bugs 2016-12-28 20:16:13 -05:00
rocky
263c63e009 Back of some of the verification changes 2016-12-09 21:43:22 -05:00
rocky
813bce4697 Merge branch 'master' of github.com:rocky/python-uncompyle6 2016-12-09 21:13:31 -05:00
rocky
a5d2237435 Python 3.x else clause detection and..
- Strengthen verify check.
- weak verification on Python 3.5 for now
2016-12-09 21:10:10 -05:00
rocky
d22931cb49 Get ready for release 2.9.7
Some of the many lint things. Linting is kind of stupid though.
2016-12-04 09:36:30 -05:00
rocky
cd3cf5ec29 Use L. for line number prefix in asm and AST 2016-11-03 21:26:12 -04:00
rocky
b49d30266f Tidy assembly output a little more 2016-08-01 08:42:52 -04:00
rocky
5c9c0228ee PyPy 3.2 bug confusing RETURN_END_IF for except
Also fix a instruction formatting bug
2016-07-28 00:41:40 -04:00
rocky
3a78332d59 tok.format -> tok.__str__; simplify pypy code 2016-07-27 09:26:39 -04:00
rocky
74f440bd0b Usuability fixes
* try using format for __str__
* Explicitly nuke self.attr and self.pattr when no arg
* Sync pysource and format wrt make_function
2016-07-26 20:49:41 -04:00
rocky
9f0b0809b1 Instruction formatting - yet again 2016-07-25 23:09:34 -04:00
rocky
04cc80b0d6 PyPy BUILD_MAP_n. Reinstate bytecode tests 2016-07-25 21:53:56 -04:00
rocky
285444e19a Better assembly formatting of jump instructions 2016-07-25 00:36:39 -04:00
rocky
4a3a62d01b Align disassembly output with xdis
align number of offset fields with xdis.
Show None type when we mean None, not ''
2016-07-17 14:00:00 -04:00
rocky
942b15e3c6 Suppress arg in dissassembly if there is none 2016-07-16 14:12:31 -04:00
rocky
8943167e96 Alight instructions
Merge recent changes with master
2016-06-19 03:01:10 -04:00
rocky
a08ece371e pydisassemble improvements; DRY scannners
disas.py:
 - disassembles *all* code objects found

scanner*.py:
 - no longer need to pass in version numbers; this
   is obtained from the class name
 - no longer pass in opcodes; this is done at
   initialization from the scanner name
 - all Pythoin 3 scanners support native disassembly
2016-05-18 10:58:48 -04:00
rocky
d42f84a59c Go over disassembly routine...
* tok.py:
  - add arg value when it is an integer
* pydisassemble.py:
  - add option -U --uncomplyle for which flavor of disassembly
  - remove -o option
* scanner27.py:
  - allow for native (non-uncompyle6) output
2016-05-17 22:52:16 -04:00
rocky
bb31629c35 pydisassemble disassemble without grammar mangling
Some other small cleanups as well
2016-05-15 13:55:21 -04:00
rocky
1456f820f2 Start Python3 slices. Split off token routine. 2015-12-21 12:17:57 -05:00