You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
3.x while/else can now sometime have COME_FROMs
This commit is contained in:
@@ -39,7 +39,7 @@ python_versions = [v for v in magics.python_versions if
|
|||||||
TEST_VERSIONS = (
|
TEST_VERSIONS = (
|
||||||
'pypy3-2.4.0', 'pypy-2.6.1',
|
'pypy3-2.4.0', 'pypy-2.6.1',
|
||||||
'pypy-5.0.1', 'pypy-5.3.1', 'pypy3.5-5.7.1-beta',
|
'pypy-5.0.1', 'pypy-5.3.1', 'pypy3.5-5.7.1-beta',
|
||||||
'pypy3.5-5.9.0',
|
'pypy3.5-5.9.0', 'pypy3.5-6.0.0',
|
||||||
'native') + tuple(python_versions)
|
'native') + tuple(python_versions)
|
||||||
|
|
||||||
|
|
||||||
@@ -60,7 +60,11 @@ test_options = {
|
|||||||
|
|
||||||
for vers in TEST_VERSIONS:
|
for vers in TEST_VERSIONS:
|
||||||
if vers.startswith('pypy'):
|
if vers.startswith('pypy'):
|
||||||
short_vers = vers[0:-2]
|
if vers.startswith('pypy3.'):
|
||||||
|
short_vers = vers[4:6]
|
||||||
|
else:
|
||||||
|
short_vers = vers[0:-2]
|
||||||
|
|
||||||
test_options[vers] = (os.path.join(lib_prefix, vers, 'lib_pypy'),
|
test_options[vers] = (os.path.join(lib_prefix, vers, 'lib_pypy'),
|
||||||
PYC, 'python-lib'+short_vers)
|
PYC, 'python-lib'+short_vers)
|
||||||
else:
|
else:
|
||||||
|
@@ -42,7 +42,7 @@ class Python34Parser(Python33Parser):
|
|||||||
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK
|
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK
|
||||||
else_suitel COME_FROM
|
else_suitel COME_FROM
|
||||||
|
|
||||||
while1elsestmt ::= SETUP_LOOP l_stmts JUMP_BACK POP_BLOCK else_suitel
|
while1elsestmt ::= SETUP_LOOP l_stmts JUMP_BACK _come_froms POP_BLOCK else_suitel
|
||||||
COME_FROM_LOOP
|
COME_FROM_LOOP
|
||||||
|
|
||||||
# Python 3.4+ optimizes the trailing two JUMPS away
|
# Python 3.4+ optimizes the trailing two JUMPS away
|
||||||
|
Reference in New Issue
Block a user