rocky
117b4ff4f1
Add kwonly parsing.
...
* annotation parsing for kwonly args is missing.
* Start filling out runnable tests. More work is needed on tests.
* refresh incorrect bytecode_3.3_run/15_assert.pyc
2019-06-08 15:29:18 -04:00
rocky
46acb74745
Only add forward-jumping COME_FROM in 3.6+
...
Is this a repeat commit?
2019-05-14 06:28:29 -04:00
rocky
44e1288e2f
Less dishonest COME_FROMs
...
Addresses all of the problems seen in 3.7 datetime.py.
However we limit COME_FROMs only to forward jumps, not back (which in the case of Python code right now means looping) jumps.
2019-05-13 23:15:55 -04:00
rocky
86dd321256
Accept x0ret's suggestion for 3.6+ if detection..
...
in the presense of a try block.
Fixes #229
2019-05-10 19:36:16 -04:00
rocky
05db6194ec
Use up right 3.x opcodes in jump detection...
...
A small but pervasive, and I guess important change. More correct COME_FROMs
are now coming out. A number of grammar changes then in 3.0, 3.5, and 3.8
2019-04-23 05:14:29 -04:00
rocky
9b550b9dda
PEP E225 with a nod to Deepcommit
2019-04-14 06:11:16 -04:00
rocky
5e1340a2fc
3.8 exception handling
2019-04-11 12:09:24 -04:00
rocky
7f65a8a6dd
3.8 SETUP_EXCEPT removal workaround; reinstate option -c | --compile
2019-04-11 07:19:35 -04:00
rocky
82fb9426af
[WIP] - move forward a tad on Python 3.8
2019-03-28 12:10:08 -04:00
rocky
cd64156708
Fix else detection bug in Python 3.6+
2019-03-23 08:57:34 -04:00
rocky
dcad6cf6ce
Fix if return boundary in 3.6+
...
Fixes #209
2019-03-10 05:59:15 -04:00
rocky
a2321773d7
Fix Python 3.x try/else detection
...
Fixes #155
2019-01-01 22:50:28 -05:00
rocky
acd0e5fea6
Note weirdness in try/else
2019-01-01 09:40:59 -05:00
rocky
a7ceedb62c
Python 3.6+ control flow
2018-12-15 09:17:54 -05:00
rocky
c6b3e20b47
Remove some of the 3.0 3.x instruction hackiness
2018-06-24 18:23:38 -04:00
rocky
4cbd136635
Make Python 3.0 control flow more like 3.x
2018-06-24 12:56:43 -04:00
rocky
d32e67891b
More 3.0 bug fixing and tollerance and...
...
add some 1.4 bytecode tests
2018-06-12 12:19:43 -04:00
rocky
600e56b1d7
Better "continue" detection on Python 3.0
2018-06-12 04:47:29 -04:00
rocky
c481d97866
A more uniform way to track opcodes seen...
...
use a set rather than these boolean variables. Done in 3.x
only for now. May do more later..
2018-04-18 12:01:46 -04:00
rocky
1890aad660
Small 3.7 steps
2018-04-13 07:26:32 -04:00
rocky
68821efdb0
Improve 3.5+ BUILD_MAP_UNPACK...
...
And add build_tuple_unpack runtime test from a previous commit.
We are far from out of the woods, as there is more to do and
we've uncovered more bugs in handling this.
2018-04-06 21:34:31 -04:00
rocky
ff9ae4e792
Better handling of BUILD_TUPLE_UNPACK
2018-04-06 11:35:41 -04:00
rocky
d9eb5c5b09
Start folding in 3.5 vararg ops as varargs ops
2018-04-05 23:02:45 -04:00
rocky
1cd2d1e915
DRY scanner code more...
...
Expand 2.6 testing
2018-04-03 10:35:02 -04:00
rocky
fad43feb3d
DRY instruction building code...
...
There is a little more that could be done with self.offset2inst_index
2018-04-03 04:41:36 -04:00
rocky
f18ce71e91
Replace all_instrs with inst_matches...
...
which works on 3.6+. Still should write a pytest for this.
2018-03-29 21:23:26 -04:00
rocky
d90c44b454
3.5+ handle then before "if" jump going to loop
2018-03-27 19:24:29 -04:00
rocky
c5f8bbf32d
Remove hacky 3.x offset address arithmetic
2018-03-26 14:50:17 -04:00
rocky
26e1df835c
Better "continue" detection for 2.7
2018-03-01 23:34:26 -05:00
rocky
6807015526
Better CONTINUE detection on 3.x
...
Helps when line numbers have been stripped say in optimization
2018-03-01 22:47:36 -05:00
rocky
f7439f506a
Fix 3.6 MAKE_FUNCTION for kw params...
...
and remove duplicated attributies in pattr of MAKE_FUNCITON token.
2018-03-01 07:14:46 -05:00
rocky
e23315b2e6
Fallout from more precise token attributes
2018-02-28 23:35:52 -05:00
rocky
413df51dfa
Token.format(), shows CONST values better...
...
We were not showing the proper value for None, or False.
Start a unit test for Token().
I think this cleans the Token class up a little more.
More work is needed for MAKE_FUNCTION...
Note: Some debug stuff is commented out in make_funciton.py for upcoming work.
2018-02-28 22:05:12 -05:00
rocky
c43c9a19aa
Move to GPL3 license
2018-02-27 06:40:36 -05:00
rocky
d3f5ec6f30
Fix Bug in recalculating prev_op ...
...
in removing EXTENDED_ARG
2018-02-27 06:15:37 -05:00
rocky
d09e820d89
Use get_inst() to paper around EXTENDED_ARG
2018-02-25 23:02:23 -05:00
rocky
493835b8cd
bild_lines API changed. Adjust test for change
2018-02-25 21:27:09 -05:00
rocky
f6aa775d58
EXTENDED_ARG in 3.6 fixes
...
3.6 uses EXTENDED_ARG more often appearing as the targets of jump
instructions at the beginning of line statements. All of this wreaks
havoc in the current way that our instruction processing works
2018-02-25 21:06:57 -05:00
rocky
2f6a85d538
Merge branch 'master' into extended_args
2018-02-25 19:19:32 -05:00
rocky
8c0f256b78
Sync python2 and python3 scanner/injest code more
2018-02-25 09:42:04 -05:00
rocky
6e2ca8f53d
Add another guard on a test
2018-02-25 08:59:12 -05:00
rocky
c1ed6dea62
Merge branch 'master' into extended_args
2018-02-25 08:57:11 -05:00
rocky
e3d0b1b9ce
move more toward instruction-based ingest...
...
rather than bytecode-based. This cleans up code
up a little bit better by using more general instructions
2018-02-25 08:51:50 -05:00
rocky
aaf83ea35d
WIP: Handle EXTENDED_ARGS better
2018-02-25 08:22:07 -05:00
rocky
b2dfe0889a
Mark more 3.6+ code that needs to be fixed
2018-01-20 08:09:18 -05:00
rocky
8194595ec9
Handle 3.6+ EXTENDED_ARGs for POP_JUMP_IF... instructions
2018-01-19 16:56:21 -05:00
rocky
f59174575e
Fix 3.5+ bug in if's with pass bodies
...
Fixes #104 in a somewhat hacky way.
2018-01-08 10:21:53 -05:00
rocky
b0d18cae6a
Fix bug in 2.5- try/else inside ifelsestmt
2018-01-06 22:19:44 -05:00
rocky
b139e21ca3
Isolation of <= 3.5 bogus COME_FROM workaround
...
Fixes #144
2017-12-12 12:12:29 -05:00
rocky
41bfa3fc01
Back off 3.5 control flow for now
2017-12-07 15:25:32 -05:00