rocky
4c9cd5657e
Merge branch 'master' into python-2.4
2017-08-09 21:45:50 -04:00
rocky
d138a01bf1
xdis's "exception match" is now "exception-match"
2017-07-17 22:42:57 -04:00
rocky
27ab6fe2f5
Use xdis 3.5.0's opcode sets
2017-07-08 20:41:46 -04:00
rocky
0893652943
Work around not having real flow-control analysis
2017-06-29 20:49:01 -04:00
rocky
6efd7afda3
continue non-detection in Python 2.7
...
fixes issue 122
2017-06-29 20:27:07 -04:00
rocky
6888553773
Merge branch 'master' into python-2.4
2017-06-25 18:56:31 -04:00
rocky
af3d46b35c
Use xdis' instruction offset calculation fns..
...
next_offset, op_size, has_argument
2017-06-24 06:43:04 -04:00
rocky
0f489672b9
More merge fixups from master
2017-06-18 16:05:22 -04:00
rocky
b7d8cbfaf5
Merge branch 'master' into python-2.4
2017-06-18 15:40:40 -04:00
rocky
c7f8edd5ef
Simplify access to L65536 ...
...
and fix use in scanner26.py. Thanks to AnythingTechPro
2017-06-09 18:22:02 -04:00
rocky
e56ab2dcd5
Sync with master
2017-05-06 07:17:04 -04:00
rocky
7e8f7ba674
namedtuple25 -> namedtuple24
2017-04-14 05:42:44 -04:00
rocky
f7a910ec66
Merge branch 'master' into python-2.4
2017-03-01 05:55:26 -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
0fa0641974
Merge branch 'master' into python-2.4
2017-01-29 22:05:55 -05:00
rocky
1cb2cd7a82
More 2.6, 2.7 control flow
...
Todo more COME_FROMs but now need to check targets better. In some cases
we're relying on grammar ambiguity to work out right and in 2.7 it doesn't
2017-01-24 01:21:28 -05:00
rocky
9ec312ba5e
More 2.6, 2.7 control-flow bugs
...
Wasn't limiting exception clause to try finally. Probably still has bugs
in try-finally nesting
Add another 2.6/2.7 COME_FROM to try to limit if/end scope better
2017-01-24 00:53:30 -05:00
rocky
597d51951e
Improve Python 2.6 & 2.7 verification
2017-01-23 02:32:09 -05:00
rocky
8dc23e2cdc
Python 2.1 doesn't have FOR_ITER or GET_ITER...
...
adjust locgic for this fact
2017-01-15 09:50:38 -05:00
rocky
89429339fa
Merge branch 'master' into python-2.4
2017-01-11 19:25:44 -05:00
rocky
ec0669367f
Towards better 3.0 decompilation
...
Sync scanner2 and scanner3 better
2017-01-08 17:40:57 -05:00
rocky
b00651d428
Merge master branche
...
Handle 2.2 list_if
2016-12-31 05:19:21 -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
6c546fe6e1
WIP : Add THEN to disambigute from "and"
2016-12-27 22:45:08 -05:00
rocky
37272ae827
Merge commit '9b1dd0f' into python-2.4
2016-12-27 10:32:25 -05:00
rocky
9b1dd0f26c
Make 2.6 and 2.7 ingest more alike
2016-12-27 10:29:29 -05:00
rocky
012ff91cfb
Merge branch 'master' into python-2.4
2016-12-25 07:57:17 -05:00
rocky
e3f4beeb74
Lint
2016-12-24 07:45:02 -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
eebec48308
show-asm on python2.5 is optional
...
make scanner2 look a little more like scanner3
2016-12-17 08:01:25 -05:00
rocky
45b7c1948c
show-asm on python2.5 is optional
...
Make scanner2 a little more like scanner3.
2016-12-17 07:57:31 -05:00
rocky
e2fb7ca3d2
Python 2.6/2.7 tolerance in Python 2.4 branch
2016-12-17 06:51:47 -05:00
rocky
1a8a0df107
Merge branch 'master' into python-2.4
2016-12-04 13:40:06 -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
1e324e0e8d
Misc changes
...
scanner26.py: make scanner2.py and scanner26.py more alike
scanner2.py: check that return stmt is last in list. (May change)
main.py: show filename on verify error
test/*: add more
2016-11-26 21:41:45 -05:00
rocky
abecb21671
2.7 grammar bug workaround. Fix docstring bug
2016-11-24 21:57:39 -05:00
rocky
8941417a54
<2.7 "if" detection and dup Python 3 grammar rule
2016-11-24 05:33:08 -05:00
rocky
460069ceaa
Bug in 2.4 "if" dectection and...
...
Wrong language used in old-style exceptions: use "except Error,e" not
"except Error(e)""
2016-11-24 05:15:35 -05:00
rocky
7133540c23
Make work on 2.4
2016-11-23 08:26:12 -05:00
rocky
590231741d
Merge branch 'come-from-type' into python-2.4
2016-11-23 07:54:18 -05:00
rocky
a9349b8f3d
Making it run on Python 2.4 and 2.5
2016-11-23 07:53:51 -05:00
rocky
260ddedbfd
More detailed COME_FROMs
...
For now we only add COME_FROM_FINALLY and COME_FROM_WITH
and even here only on 2.7
2016-11-22 19:42:26 -05:00
rocky
2bc316d6f0
more 2.7 control flow bug fixing
2016-11-20 06:55:08 -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
9e3026bd78
WIP Grammar changes - reinstatng COME_FROMs around ignore_if's
2016-11-15 23:44:22 -05:00
rocky
766451cbb9
WIP remove COME_FROMs around ignore_if's
2016-11-14 09:27:56 -05:00
rocky
6073c77921
Show line numbers in 2.6 "after" asm ..
...
start to understand some of the Python 2.6 bytecode parse failures.
2016-11-14 00:30:23 -05:00
rocky
cd3cf5ec29
Use L. for line number prefix in asm and AST
2016-11-03 21:26:12 -04:00