You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Merge branch 'master' into python-2.4
This commit is contained in:
@@ -38,7 +38,7 @@ python_versions = [v for v in magics.python_versions if
|
||||
TEST_VERSIONS = (
|
||||
'pypy3-2.4.0', 'pypy-2.6.1',
|
||||
'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)
|
||||
|
||||
|
||||
@@ -59,7 +59,11 @@ test_options = {
|
||||
|
||||
for vers in TEST_VERSIONS:
|
||||
if vers.startswith('pypy'):
|
||||
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'),
|
||||
PYC, 'python-lib'+short_vers)
|
||||
else:
|
||||
|
@@ -98,7 +98,7 @@ class Python30Parser(Python31Parser):
|
||||
# The below rules in fact are the same or similar.
|
||||
|
||||
jmp_true ::= JUMP_IF_TRUE POP_TOP
|
||||
jmp_false ::= JUMP_IF_FALSE POP_TOP
|
||||
jmp_false ::= JUMP_IF_FALSE _come_froms POP_TOP
|
||||
|
||||
for_block ::= l_stmts_opt _come_froms POP_TOP JUMP_BACK
|
||||
|
||||
@@ -107,7 +107,7 @@ class Python30Parser(Python31Parser):
|
||||
except_handler ::= jmp_abs COME_FROM_EXCEPT except_stmts
|
||||
POP_TOP END_FINALLY
|
||||
|
||||
return_if_stmt ::= ret_expr RETURN_END_IF POP_TOP
|
||||
return_if_stmt ::= ret_expr RETURN_END_IF COME_FROM POP_TOP
|
||||
and ::= expr jmp_false expr come_from_opt
|
||||
whilestmt ::= SETUP_LOOP testexpr l_stmts_opt come_from_opt
|
||||
JUMP_BACK COME_FROM POP_TOP POP_BLOCK COME_FROM_LOOP
|
||||
|
@@ -42,7 +42,7 @@ class Python34Parser(Python33Parser):
|
||||
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK
|
||||
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
|
||||
|
||||
# Python 3.4+ optimizes the trailing two JUMPS away
|
||||
|
Reference in New Issue
Block a user