rocky
73857c831b
Typo
2017-05-13 06:12:31 -04:00
rocky
d540146d5a
WIP: start 3.6 MAKE_FUNCTION handling
2017-05-11 07:00:46 -04:00
rocky
f8a40c1949
Reduce spurious "continue" statements
2017-05-07 13:15:26 -04:00
rocky
605721c995
Python 3.x control-flow bug...
...
"pass" statement inside "while True"
2017-05-07 09:10:05 -04:00
rocky
26e8de8532
Fix improper COME_FROM_EXCEPT in Python 3.3+
2017-05-07 03:19:53 -04:00
rocky
4e9555a7f6
Improve Python 3.2 decompilation ...
...
by removing a lot of the control-flow labels of 3.3+
2017-05-05 21:34:21 -04:00
rocky
47dbc57f3d
Reduce adding RETURN_END_IF in 3.5+
...
The whole control flow determination has to be redone in a less
haphazard way using real flow-control analysis. Hopefully that's on the
way.
In the meantime we have this hack.
2017-04-14 06:57:25 -04:00
rocky
fdcb90f661
Python 3.0 doesn't have POP_JUMP_IF...
2017-03-12 10:32:05 -04:00
rocky
5856802902
Small cleanup - remove POP_JUMP_TF
2017-03-07 22:07:29 -05:00
rocky
4f2ae2f603
More accurate ranges of try blocks in 3.x
2017-03-05 00:05:52 -05:00
rocky
160ec0d9cc
COME_FROM for 3.x POP_EXCEPT, DRY with op_name() ...
...
Start adding COME_FROMs for POP_EXCEPT in preparation for
getting tryelse blocks correct.
Simpler opname access functions:
- self.op_name(op) is self.opc.opname[op]
- self.op_name_from_offset(offset) is self.opc.opname[self.code[offset]]
verify.py: not all offsets are ints
2017-03-01 05:50:31 -05:00
rocky
493e4b14a1
Some Python 3.4 bugss fixed by using 3.5 rules
2017-02-20 08:17:17 -05:00
rocky
9491c67779
More COME_FROM's in Python 3...
...
Need this to find boundaries of simple if better
2017-02-20 04:17:46 -05:00
rocky
8333e4ae93
Handle BUILD_CONST_KEY_MAP as a varargs
...
custom rules with BUILD_CONST_KEY_MAP are pinned to the specific number
of args seen.
2017-01-20 20:41:10 -05:00
rocky
9c49b5d54b
Handle 3.6 BUILD_CONST_KEYMAP
2017-01-15 11:10:13 -05:00
rocky
707770049f
Python 3.0 decompile bugs
2017-01-08 22:19:15 -05:00
rocky
ec0669367f
Towards better 3.0 decompilation
...
Sync scanner2 and scanner3 better
2017-01-08 17:40:57 -05:00
rocky
3f40c16587
Fix 3.5, 3.6 while true if/break bug
2017-01-08 15:54:49 -05:00
rocky
21023fea74
Add 3.5+ async with/for ..
...
scanner3.py: 3.6 bytecode vs wordcode fix
2017-01-08 08:54:03 -05:00
rocky
e4c0d56947
3.5 continue check is needed on 3.6
2017-01-03 07:22:25 -05:00
rocky
4827b1e994
Towards better 3.6 support
2017-01-03 00:44:07 -05:00
rocky
2b46e71264
Python 3.5 continue detection bug
2017-01-02 10:06:52 -05:00
rocky
84c2932bc5
add come_from for setup_finally and setup_except
2017-01-01 21:11:35 -05:00
rocky
874b3c9d31
Towards fixing Python 3.5 return bugs
2017-01-01 04:56:15 -05:00
rocky
2327f0fdfa
Towards fixing a Python 3.3 return/continue bug
2016-12-31 03:56:41 -05:00
rocky
6f097ff1ca
dectect_structure() -> detect_control_flow()
2016-12-29 07:32:36 -05:00
rocky
8eb1a16f5b
DRY code and emitted Python 3 source
...
* Python 3: break; continue -> break
* Use variable in detect_structure for pre[rtarget]
* Make Python 2 and Python 3 detect_structure more alie
2016-12-29 07:28:37 -05:00
rocky
ed9fb64e72
More if/then detection in Python 3.x
2016-12-29 03:56:39 -05:00
rocky
e6761e13bb
Python flake8 crap
...
Was testing realgud's C-x!8 (goto flake8 warning/error)
2016-12-18 20:18:19 -05:00
rocky
08dcc7d820
Start to handle 3.5 build_map_unpack_with_call
...
3.6 also started but needs even more work
2016-12-16 20:39:24 -05:00
rocky
7755563b65
Some Python 3.6 bytecode->wordcode fixes
2016-12-15 02:54:25 -05:00
rocky
38eed14b41
Another python 3 ELSE fixes and ...
...
Makefile:
- test python 3.0 bytecode
- turn full --verify back on Python 3.x
2016-12-10 06:36:22 -05:00
rocky
2c993f8c32
Another faulty Python3 ELSE tag remove
2016-12-10 00:43:55 -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
97576e473d
Python 3 while/else bug
2016-11-27 07:06:20 -05:00
rocky
0f56b4f476
Add debug option on Python 3 find_jump_targets()
2016-11-20 03:21:03 -05:00
rocky
f2a3721d7d
Start to improve detect_structure for 2.7 and 2.x
...
Add debug flag to find_jump_targets to show the structure we found.
When there are control-flow bugs, it's often reflected here.
scanner3.py: make code make more similar to 2.x code
2016-11-20 02:38:59 -05:00
rocky
76ae1592d0
verify scanner2 vs scanner3 small changes...
...
verify.py: allow LOAD_CONST None to make LOAD_NAME 'None'
scanner{2,3}.py: make them look more alike
2016-11-17 03:43:39 -05:00
rocky
80a4ad4f1b
Python 3.0 while1 if bug...
...
Is a workaround. We really need more tagging in of SETUP_LOOP and COME_FROM.
2016-11-13 01:28:36 -05:00
rocky
5d10f7a0b0
Python 3.0 doesn't have POP_JUMP ops...
...
In some ways Python 3.0 code generation is more like Python 2.6 (and
before) than it is Python 2.7 or 3.0.
2016-11-06 08:55:03 -05:00
rocky
abb61a4d7d
Fix some Python 3.1 bugs
2016-10-24 02:16:23 -04:00
rocky
d6f7ef4e17
DRY op_size
...
Move from scanner{2,3}.py to scanner.py
2016-10-21 07:40:35 -04:00
rocky
346d8678d2
Merge in COME_FROM disambiguation ...
...
from controlflowbranch. Should probably expand to Python2
parsers as well
2016-10-06 03:27:37 -04:00
rocky
649e4518fe
Python 3: "and" doesn't have optional come_from
2016-10-05 03:34:29 -04:00
rocky
fe46015b78
PY3 COME_FROM_LOOP bug
...
There are still more in sre...
2016-09-27 04:59:06 -04:00
rocky
051efb80f5
PY3: COME_FROM -> COME_FROM_FINALLY as appropriate
...
We now have all WITH_ op jumps associated in the grammar
Also, some COME_FROM_LOOP grammar fixes
2016-09-27 03:27:41 -04:00
rocky
1fc8ac4700
Interval order COME_FROMs in Python3
...
This bug had possibly caused lots of grammar pollution which may need
addressing.
We want to process COME_FROMs to the same offset to be in *descending*
order so we have the larger range or biggest instruction interval
last. (I think they are sorted in increasing order, but for safety
we sort them). That way, specific COME_FROM tags will match up
properly. For example, a "loop" with an "if" nested in it should have
the "loop" tag last so the grammar rule matches that properly
Adjust Python 3 grammar for more COME_FROM -> COME_FROM_LOOP. And
remove optional COME_FROM_LOOP where possible. Previously, the
optional-ness was a result of inner nestings gobbling up the
COME_FROM.
We'll probably want to go back and fix this up in Python2.
2016-09-26 09:26:51 -04:00
rocky
c87710dd4b
Python 3 COME_FROM -> COME_FROM_WITH appropriately
2016-09-26 08:09:05 -04:00