add support for WITH_CLEANUP_START,WITH_CLEANUP_FINISH

This commit is contained in:
MrDakik
2024-02-27 10:54:07 +02:00
parent d361ec3e7d
commit e8be65b2f3
3 changed files with 4 additions and 0 deletions

View File

@@ -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) {