add support for WITH_CLEANUP_START
,WITH_CLEANUP_FINISH
This commit is contained in:
@@ -1885,6 +1885,7 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
|
||||
}
|
||||
break;
|
||||
case Pyc::WITH_CLEANUP:
|
||||
case Pyc::WITH_CLEANUP_START:
|
||||
{
|
||||
// Stack top should be a None. Ignore it.
|
||||
PycRef<ASTNode> none = stack.top();
|
||||
@@ -1907,6 +1908,9 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Pyc::WITH_CLEANUP_FINISH:
|
||||
/* Ignore this */
|
||||
break;
|
||||
case Pyc::SETUP_EXCEPT_A:
|
||||
{
|
||||
if (curblock->blktype() == ASTBlock::BLK_CONTAINER) {
|
||||
|
BIN
tests/compiled/test_with.3.4.pyc
Normal file
BIN
tests/compiled/test_with.3.4.pyc
Normal file
Binary file not shown.
BIN
tests/compiled/test_with.3.5.pyc
Normal file
BIN
tests/compiled/test_with.3.5.pyc
Normal file
Binary file not shown.
Reference in New Issue
Block a user