Commit Graph

61 Commits

Author SHA1 Message Date
rocky
ddc5460030 Start to handle Python 3.1 bytecode 2016-08-26 20:50:08 -04:00
rocky
3a6f9d8f24 Fix 3.5 misclassifying RETURN_VALUE
We use location of SETUP_EXCEPT instructions to disambiguate.
2016-07-29 08:56:23 -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
5ffd9b2be7 2.6 and 2.7 while1 grammar rule
Fixes issue #40
2016-07-27 13:19:42 -04:00
rocky
3a78332d59 tok.format -> tok.__str__; simplify pypy code 2016-07-27 09:26:39 -04:00
rocky
6c5bd6289f More PyPy grammar rules
* assert one and two-arg form
* trystmt

Simplify adding multiple grammar rules
2016-07-26 10:21:12 -04:00
rocky
04cc80b0d6 PyPy BUILD_MAP_n. Reinstate bytecode tests 2016-07-25 21:53:56 -04:00
rocky
a3e10db8dc Handle PyPy CALL_METHOD op more correctly
Start testing pypy2.7 and 3.2 bytecodes
2016-07-25 13:05:54 -04:00
rocky
476eb50868 Handle PyPy JUMP_IF_NOT_DEBUG
Update README.rst to note PyPY and reorganize a little
2016-07-25 09:18:03 -04:00
rocky
285444e19a Better assembly formatting of jump instructions 2016-07-25 00:36:39 -04:00
rocky
aed4d23c34 More PyPy LOOKUP_METHOD rules 2016-07-24 20:59:44 -04:00
rocky
1c50e34c30 PyPy support
* Use proper PYPY 32 opcodes
* handle opcodes LOOKUP_METHOD and CALL_METHOD
* Administrative stuff for PyPy
2016-07-24 18:54:51 -04:00
rocky
21683719e1 Start supporting PyPy 3.2
Add some PyPy 2.7 and PyPy 3.2 bytecode files
2016-07-24 04:17:54 -04:00
rocky
21377f3b43 Merge branch 'master' into pypy
Conflicts:
	uncompyle6/scanners/scanner2.py
2016-07-23 10:57:58 -04:00
rocky
ea733c31d7 Respect after/both option in scanner3 2016-07-17 12:38:48 -04:00
rocky
942b15e3c6 Suppress arg in dissassembly if there is none 2016-07-16 14:12:31 -04:00
rocky
fb870ccd8d 3.x ""raise AssertionError" vs "assert"
Not sure this is totally correct yet.
2016-07-14 10:31:12 -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
9fdf70f68d Python 3.(4?) while1 bug
Clean up while1 grammar a tad
2016-07-11 10:18:18 -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
9c2f48ca4a DRY and clean up code a little 2016-07-10 08:39:50 -04:00
rocky
44dba42a40 Remove JA. Use standard JUMP_ABSOLUTE instead 2016-07-10 08:21:17 -04:00
rocky
af62286357 Python 2/3 compatibility bug 2016-07-10 08:15:22 -04:00
rocky
3cd3f7ccdf Bugs caused by 3.x jump_forward misclasification 2016-07-10 08:05:18 -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
ae78e9f930 Python3 scanner code cleanup 2016-07-09 05:17:10 -04:00
rocky
0075c8a5f7 Python 3 code cleanup 2016-07-08 22:33:42 -04:00
rocky
1a83c849dc Python 3 needs Python2's RETURN_END_IF
Make python2 and python3 scanner look more the same
2016-06-20 22:12:29 -04:00
rocky
a6fbe4c636 previous 2.7 class decorator bug fixed in 3.x 2016-06-20 20:19:17 -04:00
rocky
8c374904f5 3.x make closure kw args handling bug 2016-06-20 10:01:18 -04:00
rocky
10b95cd9a8 Fix * in multi-target assignment 2016-06-19 02:31:19 -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
167f5af5e6 Misc refactorings 2016-06-02 16:58:42 -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
90741148ad DRY scanners more 2016-05-28 17:07:43 -04:00
rocky
fca233419f Remove dis3. Fix in 3.x list if not comprehension 2016-05-28 12:05:38 -04:00
rocky
0a64c478c3 Remove dup 3.x opcodes 2016-05-28 01:54:04 -04:00
rocky
4398b5b2e0 Use xdis for code, magics, and marshal 2016-05-27 19:18:06 -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
f69c76c351 Fix a number of small bugs...
test_peynv.py: make Python3 compatible
marsh.py: remove duplicate test
scanner3.py: fix opcode typo
2016-05-16 21:31:02 -04:00
rocky
bdd7df6040 Python 2 loop scanner detection in Python 3
scanner*.py: Make scanner27 and scanner3 more aligned
Makefile: we can run py.test on Python 3.5
HISTORY.md: grammar changes
2016-05-16 13:40:55 -04:00
rocky
134b67d952 Misc small changes
Go over history yet again
code cleanups.
2016-05-16 10:15:55 -04:00
rocky
2c121545f0 Fix bug in Python 3 lambda expression handling
Some other small cleanup changes
2016-05-15 18:14:22 -04:00
rocky
bb31629c35 pydisassemble disassemble without grammar mangling
Some other small cleanups as well
2016-05-15 13:55:21 -04:00
rocky
b9692c9b1f DRY scanner34 and scanner35
handle 3.0..3.4 build maps as key/value pairs
2016-05-15 03:29:08 -04:00
rocky
5babde61c4 Misc changes
Back off of some validation tests for now.
2016-05-12 11:22:00 -04:00
rocky
6f6f1db576 Misc fixups/cleanups
* parse3.py Had botched if-for-else test by grammar addition
* semantics/*.py: Show errorstack in failed parse when -g (requires sparck 1.2.0)
* some optimization in scanner3
2016-05-12 09:27:25 -04:00
rocky
631d7be921 Redo make_function for *, arg
main(*, file='foo') and things like that now work
2016-05-11 20:34:20 -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