Open Levak opened 5 months ago
Fantastic update! I think this one works the best so far. There are still a few I'm not able to resolve, but I'm reviewing everyone’s repos to get more insights.
Unsupported opcode: LOAD_ASSERTION_ERROR Unsupported opcode: LOAD_ASSERTION_ERROR Unsupported opcode: LOAD_ASSERTION_ERROR Warning: Stack history is not empty! Warning: block stack is not empty! Warning: block stack is not empty! Warning: block stack is not empty! Warning: Stack history is not empty! Warning: block stack is not empty! Unsupported opcode: LOAD_ASSERTION_ERROR Unsupported opcode: LOAD_ASSERTION_ERROR Warning: block stack is not empty! Unsupported opcode: LOAD_ASSERTION_ERROR Unsupported opcode: LOAD_ASSERTION_ERROR
Add tests for simple cases of try-except-finally (rename one old Python 2.6 test);
Implement
JUMP_IF_NOT_EXC_MATCH_A
with a fakeCMP_EXCEPTION
followed by aPOP_JUMP_IF_TRUE
;Implement
BEGIN_FINALLY
with a fakeLOAD_CONST_A None
;Implement Python 3.8+ specific
SETUP_FINALLY_A
handling both EXCEPT and FINALLY cases. We guess which is which by looking at the targeted block that seems to either be aPOP_TOP
or aDUP_TOP
in the case of an EXCEPT block;Implement
RERAISE
with a fakeEND_FINALLY
;In Python 3.9+, emulate a
BEGIN_FINALLY
whenPOP_BLOCK
is not followed by aJUMP_FORWARD_A
(maybe source of bugs);In Python 3.9+, skip the duplicated code from the FINALLY blocks with a jump in bytecode and a fake
END_FINALLY
.