rocky
98a6f47ad6
Python 2.2 scanner bug: don't mung IMPORT_NAME op
2016-08-16 06:38:09 -04:00
rocky
285444e19a
Better assembly formatting of jump instructions
2016-07-25 00:36:39 -04:00
rocky
21377f3b43
Merge branch 'master' into pypy
...
Conflicts:
uncompyle6/scanners/scanner2.py
2016-07-23 10:57:58 -04:00
rocky
942b15e3c6
Suppress arg in dissassembly if there is none
2016-07-16 14:12:31 -04:00
rocky
0ee52aeeef
Isolate pseudo op IMPORT_NAME_CONT
...
I think this is a holdover from pre 2.3 days. Possibly it can be dropped altogether.
2016-07-14 21:05:09 -04:00
rocky
7b7a9fa4cf
Python 3.4 assertion handling. Improve verify
...
3.4 has jump optimization like 3.5.
verify.py: show mismatch on verification mismatch
2016-07-14 05:20:30 -04:00
rocky
59ba8a65cd
Structure detection bugs +
...
Had borked 3.4 grammar rules in
previous refactor
2016-07-10 19:21:55 -04:00
rocky
44dba42a40
Remove JA. Use standard JUMP_ABSOLUTE instead
2016-07-10 08:21:17 -04:00
rocky
52b71bb01a
Python 3 better CONTINUE op classification
...
Also document what's up with JUMP_ABSOLUTE
classification
2016-07-10 06:47:34 -04:00
rocky
65b9ecee31
Fix some 2.3 bugs; add more 2.3-6. tests
2016-07-09 17:33:54 -04:00
rocky
d6b35d57e4
DRY scanner code. Allow 2.4 decompile from 3.x
2016-07-08 21:37:09 -04:00
rocky
e31f829a56
Python 2.4 generator expressions and gen_comp_body
2016-07-08 18:00:13 -04:00
rocky
e020f8f9a9
2.5/2.6 RETURN_VALUE bug
2016-07-08 12:02:28 -04:00
rocky
0b6108801d
<2.6 make sure jump back on loops is really "back"
2016-07-07 11:43:26 -04:00
rocky
974b11ff55
Another 2.6 while stmt. Clean up grammar a little
2016-07-03 10:50:19 -04:00
rocky
32ca0c4482
2.6 ifelse/while modifications
2016-06-29 12:46:02 -04:00
rocky
ae980e4f64
Base 2.5 off of 2.6. Some other small bugs.
2016-06-28 03:31:32 -04:00
rocky
fa7d8f955a
WIP Python-2.6 but don't remove opcodes
...
The scheme for turning 2.6 bytecode into 2.7 psuedo bytecode
I think is a lose.
I won't work for fragment handling.
Instead, change the grammar and syntax rules
This also has the benefits:
* We see how code generation changed over releases
by looking at grammar and semantic rules rather
than arbitrary code
* We can better assocate with what's running
(in a sense this is a restatement of broken fragment
handling)
* With the right structure in place we are in a better position to
handle 2.5, 2.4, etc. That is, after a while, the incremental changes
to get say from python 2.3 bytecode to python 2.7 are great.
Conflicts:
uncompyle6/parsers/astnode.py
2016-06-24 18:15:59 -04:00
rocky
982a6010a1
WIP 2.6 redo bytecode handling
...
Don't try to convert 2.6 bytecode to 2.7 psuedo bytecode.
Instead adjust grammar and semantic actions.
Down the line we should to segregate version changes in
semantic code better.
2016-06-24 09:23:30 -04:00
rocky
480e6a125f
Add Python 3.5 yield from and ...
...
* fragments.py: Handle pass stmt sometimes
* scanners: regularize Python 2 scanners some
* test/test_pyenvlib.py: add python 3.5.1 option
2016-06-22 13:08:11 -04:00
rocky
ebcb1d08f4
Limited support for Python 2.3
2016-06-03 10:20:52 -04:00
rocky
eefbc40eef
option to show asm and DRY.
...
Get ready for some 2.3 support
2016-06-03 09:25:20 -04:00
rocky
3da4c9ce77
Start custom grammar for 2.6 and ...
...
fix a python 2.6.9 deparse with lc if+and+not
2016-06-02 19:16:27 -04:00
rocky
167f5af5e6
Misc refactorings
2016-06-02 16:58:42 -04:00
rocky
69bb74c86e
DRY scanner25 and scanner26 more
2016-05-29 22:18:36 -04:00
rocky
ead41d7a96
Bang again on Python 2.5 and 2.6 scanners
2016-05-29 19:13:57 -04:00
rocky
bb2e9c0d31
bang on scanner2{5,6}
2016-05-29 18:44:07 -04:00
rocky
58fd0f7fe5
Start to DRY 2.6 scanner
...
Note: can't use xdis 2.6 opcode until another xdis release.
2016-05-29 05:05:48 -04:00
rocky
e70e7bfc16
Start to DRY Python 2 scanners...
...
Get 2.7 opcodes from xdis.
2016-05-28 19:34:12 -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
37406557bc
More small changes
2016-05-12 12:59:31 -04:00
rocky
4a79082872
Fix 3.5 if..pass bug
...
Update HISTORY.MD to include Dan Pascu. Some minor doc corrections
2016-05-08 10:32:11 -04:00
rocky
52da6f4a8f
Make ScannerXX() initialization the same on Python 2.x and 3.x
2016-01-02 07:54:21 -05:00
rocky
820fdb4771
Fix up Python 2.x's ability to get code from Python 3.x's bytecode
2015-12-27 19:36:02 -05:00
rocky
44cd349cc7
DRY Python3 scanner code. Some cross version handling fixed.
...
Some Python 3.2 and 3.3 deparse fixes.
2015-12-27 04:43:35 -05:00
rocky
6bc425b45e
marshal.py: Python2 marshal code shouldn't try to turn a code object
...
into a string. parse3.py: handle both keyword and positional function
calls. scanner34.py: Remove extra level of quoting in LOAD_CONST.
Keyward handling now works cross Python 2/3. Some other spelling and doc fixes.
2015-12-18 21:20:12 -05:00
rocky
2fc2d6c699
Python 2.6 compatability via ericfrederich's patch. DRY version-checking code
2015-12-17 20:48:54 -05:00
rocky
2dc8375ed0
Supoer multiple parsers, specifically for Python2 and Python3. In the
...
process some OO cleanup and some global variable hacks removed.
2015-12-16 22:08:29 -05:00
rocky
06653a6163
On Python3.4 decompiling Python 3.4 instructions, use its
...
built-in disassembler routines. In contrast to what was here,
they most likely work!
2015-12-16 09:13:14 -05:00
rocky
9fecb48744
Tidy a little bit
2015-12-16 01:52:11 -05:00
rocky
8c94acfca0
Start 3.4 more stringent disassembly testing. Disassembly format has
...
changed slightly. misc small bugs.
2015-12-16 00:40:28 -05:00
rocky
683c75d37e
Split out marhsal and disassemble code and spell disassemble correctly.
...
Fix some lint issues
2015-12-15 12:10:03 -05:00
rocky
34ecd54e2c
README.rst: note addition of pydisassemble
...
Remove duplicate disassembly printing from scanners and
put common code in caller(s). Show source-code line numbers in disassembly output
and fix alignment of byte offsets.
disas.py: workaround Python 2/3 different layouts before we get to
bytecodes in a code object.
2015-12-15 01:42:07 -05:00
rocky
b5797dfa0f
Move scanners in its own directory. Dir base-tests -> base_tests so we
...
can import from that.
2015-12-14 09:38:46 -05:00