You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
3.8 for block without a POP_BLOCK ...
and confusing JUMP_BACK for CONTINUE. Expect more like this. Fixes #293
This commit is contained in:
BIN
test/bytecode_3.8/01_for_continue.pyc
Normal file
BIN
test/bytecode_3.8/01_for_continue.pyc
Normal file
Binary file not shown.
5
test/simple_source/bug38/01_for_continue.py
Normal file
5
test/simple_source/bug38/01_for_continue.py
Normal file
@@ -0,0 +1,5 @@
|
||||
# Bug is turning a JUMP_BACK for a CONTINUE so for has no JUMP_BACK.
|
||||
# Also there is no POP_BLOCK since there isn't anything in the loop.
|
||||
# In the future when we have better control flow, we might redo all of this.
|
||||
for i in range(2):
|
||||
pass
|
@@ -92,6 +92,7 @@ class Python38Parser(Python37Parser):
|
||||
for38 ::= expr get_iter store for_block JUMP_BACK
|
||||
for38 ::= expr for_iter store for_block JUMP_BACK
|
||||
for38 ::= expr for_iter store for_block JUMP_BACK POP_BLOCK
|
||||
for38 ::= expr for_iter store for_block
|
||||
|
||||
forelsestmt38 ::= expr for_iter store for_block POP_BLOCK else_suite
|
||||
forelselaststmt38 ::= expr for_iter store for_block POP_BLOCK else_suitec
|
||||
|
Reference in New Issue
Block a user