Support END_FOR opcode

This commit is contained in:
Sahil Jain
2025-06-30 21:35:59 +05:30
parent 307e0b8fd7
commit a4a6a24f3e
2 changed files with 5 additions and 0 deletions

2
.gitignore vendored
View File

@@ -6,3 +6,5 @@
/.kdev4 /.kdev4
__pycache__ __pycache__
tests-out tests-out
build/
.vscode/

View File

@@ -1679,6 +1679,7 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
/* Do nothing. */ /* Do nothing. */
break; break;
case Pyc::POP_TOP: case Pyc::POP_TOP:
case Pyc::END_FOR:
{ {
PycRef<ASTNode> value = stack.top(); PycRef<ASTNode> value = stack.top();
stack.pop(); stack.pop();
@@ -2473,6 +2474,8 @@ PycRef<ASTNode> BuildFromCode(PycRef<PycCode> code, PycModule* mod)
stack.push(next_tup); stack.push(next_tup);
} }
break; break;
case Pyc::COPY_A:
break;
default: default:
fprintf(stderr, "Unsupported opcode: %s (%d)\n", Pyc::OpcodeName(opcode), opcode); fprintf(stderr, "Unsupported opcode: %s (%d)\n", Pyc::OpcodeName(opcode), opcode);
cleanBuild = false; cleanBuild = false;