Commit Graph

594 Commits

Author SHA1 Message Date
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
9f0b0809b1 Instruction formatting - yet again 2016-07-25 23:09:34 -04:00
rocky
f0a8505887 Add grammar for PyPy 2-arg assert 2016-07-25 22:36:02 -04:00
rocky
04cc80b0d6 PyPy BUILD_MAP_n. Reinstate bytecode tests 2016-07-25 21:53:56 -04:00
rocky
281f429223 Handle PyPy BUILD_MAP_0 where actual kw_args > 0 2016-07-25 17:50:19 -04:00
rocky
8cfecff9c4 Clean up PyPy load_attr grammar rules 2016-07-25 16:05:08 -04:00
rocky
116b6eb468 Enable more PyPy testing 2016-07-25 14:41:27 -04:00
rocky
2509d212e5 Start checking PyPy bytecodes 2016-07-25 13:35:02 -04:00
rocky
96b83c3d85 Add pypy scanners 2016-07-25 13:29:03 -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
7e1aa6a34d add_custom_rules() in 2.x and 3.x are more alike 2016-07-25 09:33:11 -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
808e468e5e add-test: Make sure PyPy bytecode is separated 2016-07-24 10:32:35 -04:00
rocky
936b213cec Merge branch 'pypy'
Conflicts:
	test/bytecode_2.7/05_for_try_except.pyc
	uncompyle6/scanners/scanner2.py
2016-07-24 04:27:17 -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
9754d27597 Merge branch 'pypy' of github.com:rocky/python-uncompyle6 into pypy 2016-07-24 03:45:18 -04:00
rocky
7e8173b076 Note we need xdis 2.0.0 or greater 2016-07-24 03:44:26 -04:00
rocky
ca9888ace4 Another 2.7 'continue' detection bug 2016-07-23 17:44:42 -04:00
rocky
070b7dab7b Another 2.7 'continue' detection bug 2016-07-23 17:42:42 -04:00
rocky
44d95e40e6 Another 2.7 'continue' detection bug 2016-07-23 17:33:50 -04:00
rocky
f6f3ad362b 2.7: Detect "continue" inside except
Fixes issue #38.

This is a bit hacky. We need a more general "continue" detection.
2016-07-23 11:02:01 -04:00
rocky
21377f3b43 Merge branch 'master' into pypy
Conflicts:
	uncompyle6/scanners/scanner2.py
2016-07-23 10:57:58 -04:00
rocky
a5f45f232d 2.7: Detect "continue" inside except
Fixes issue #38.

This is a bit hacky. We need a more general "continue" detection.
2016-07-23 10:37:41 -04:00
rocky
7c4316d4fb Start handling pypy 2.7
Need to understand whether we care compiling pypy.
Pypy 2.7 list comprehensions are different and use
its own opcode.
2016-07-21 02:58:50 -04:00
rocky
d1ef0bf21b Update HISTORY and add link to it in README.md 2016-07-20 12:02:58 -04:00
rocky
063e517a7c Better parse error formatting
Start to move away for compiler-oriented terminology:
   Favor "instructions" over "tokens".
Syntax error -> Parse error.
2016-07-17 16:27:17 -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
ea733c31d7 Respect after/both option in scanner3 2016-07-17 12:38:48 -04:00
rocky
63ec3f934a Adjust test data for changed disasm output 2016-07-17 12:13:19 -04:00
rocky
7c261d8495 Merge branch 'master' of github.com:rocky/python-uncompyle6 2016-07-16 14:13:34 -04:00
rocky
942b15e3c6 Suppress arg in dissassembly if there is none 2016-07-16 14:12:31 -04:00
rocky
69e65463b7 More explicit usage info 2016-07-16 10:49:36 -04:00
rocky
cd8cbf9200 Add 3.5 matrix mult ops
We now run 3.5 verifycation so we need to remove some
of the tests that fail to verify pending fixing.
2016-07-15 12:12:19 -04:00
rocky
accc959b71 Get ready for release 2.7.0 release-2.7.0 2016-07-15 02:54:00 -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
c9d1f72424 Attempt to get 3.5 RETURN_END_IF working
This feels hacky and I'm not sure is quite right.
Untili we understand better what to do though, we'll
go with it.
2016-07-14 14:49:57 -04:00
rocky
29990c8da0 3.x __qualname__ = supression
Class names have become more complicated so the pattern test
needs to be more complex as well. Sigh
2016-07-14 12:57:48 -04:00
rocky
4e6e38358d 3.x list comprehenions list_if_not, comp_ifnot bug
Saw only list_if_not bug, but might also be applicable
to comp_ifnot
2016-07-14 11:30:42 -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
1e25ffa879 Reinstate some code for verification 2016-07-13 22:02:08 -04:00
rocky
7cc55f0c5f Back off showing verification errors
Pending why this failing in make.
2016-07-13 13:47:30 -04:00
rocky
723ba1365f "return None" -> "pass"
Python 3.4 classes have what looks like a return None, but this
is invalid syntax. So for now we'll remove all "return None"s.

There may be a "pass" in there instead.
2016-07-13 13:37:07 -04:00
rocky
6a125d49d8 Merge branch 'master' of github.com:rocky/python-uncompyle6 2016-07-13 13:01:36 -04:00
rocky
fd0d8d2567 Travis workaround
Not sure what's up with 01-class on 3.4. remove for now.
More info in 2.7.11 on what failed.
2016-07-13 13:00:03 -04:00
rocky
772c67fcd7 Debugging smutz caused verify failures 2016-07-13 09:53:51 -04:00
rocky
bc86b73cf0 Document/correct hide_internal and store_locals 2016-07-12 12:07:48 -04:00