You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Python 2.5 with statement
This commit is contained in:
BIN
test/bytecode_2.5/05_with.pyc
Normal file
BIN
test/bytecode_2.5/05_with.pyc
Normal file
Binary file not shown.
@@ -20,17 +20,20 @@ class Python25Parser(Python26Parser):
|
|||||||
|
|
||||||
return_if_stmt ::= ret_expr RETURN_END_IF JUMP_BACK
|
return_if_stmt ::= ret_expr RETURN_END_IF JUMP_BACK
|
||||||
|
|
||||||
# Pyython 2.6 uses ROT_TWO instead of the STORE_FAST
|
# Pyython 2.6 uses ROT_TWO instead of the STORE_xxx
|
||||||
setupwithas ::= DUP_TOP LOAD_ATTR STORE_FAST LOAD_ATTR CALL_FUNCTION_0 STORE_FAST
|
setupwithas ::= DUP_TOP LOAD_ATTR store LOAD_ATTR CALL_FUNCTION_0
|
||||||
SETUP_FINALLY LOAD_FAST DELETE_FAST
|
setup_finally
|
||||||
|
|
||||||
|
store ::= STORE_FAST
|
||||||
|
store ::= STORE_NAME
|
||||||
|
|
||||||
# Python 2.6 omits ths LOAD_FAST DELETE_FAST below
|
# Python 2.6 omits ths LOAD_FAST DELETE_FAST below
|
||||||
withasstmt ::= expr setupwithas designator suite_stmts_opt
|
withasstmt ::= expr setupwithas designator suite_stmts_opt
|
||||||
POP_BLOCK LOAD_CONST COME_FROM
|
POP_BLOCK LOAD_CONST COME_FROM
|
||||||
LOAD_FAST DELETE_FAST
|
with_cleanup
|
||||||
WITH_CLEANUP END_FINALLY
|
|
||||||
|
|
||||||
|
|
||||||
|
with_cleanup ::= LOAD_FAST DELETE_FAST WITH_CLEANUP END_FINALLY
|
||||||
|
with_cleanup ::= LOAD_NAME DELETE_NAME WITH_CLEANUP END_FINALLY
|
||||||
'''
|
'''
|
||||||
|
|
||||||
class Python25ParserSingle(Python26Parser, PythonParserSingle):
|
class Python25ParserSingle(Python26Parser, PythonParserSingle):
|
||||||
|
Reference in New Issue
Block a user