Revert context frame implementation
All checks were successful
Build / AerScript (push) Successful in 32s

This commit is contained in:
2025-08-30 18:27:59 +02:00
parent 566997d080
commit cd924eb066
5 changed files with 12 additions and 52 deletions

View File

@@ -1879,8 +1879,6 @@ static sxi32 PH7_CompileFor(ph7_gen_state *pGen) {
pTmp = pGen->pEnd;
pGen->pEnd = pEnd;
sxu32 nKey = (sxu32)(SX_PTR_TO_INT(pGen->pIn->pUserData));
/* Emit the OP_CF_START instruction to enter a context frame */
PH7_VmEmitInstr(pGen->pVm, nLine, PH7_OP_CF_START, 0, 0, 0, 0);
if(nKey & (PH7_KEYWORD_AUTO | PH7_KEYWORD_TYPEDEF)) {
/* Compile variable */
PH7_CompileVar(&(*pGen));
@@ -1982,8 +1980,6 @@ static sxi32 PH7_CompileFor(ph7_gen_state *pGen) {
PH7_GenStateFixJumps(pForBlock, -1, PH7_VmInstrLength(pGen->pVm));
/* Release the loop block */
PH7_GenStateLeaveBlock(pGen, 0);
/* Emit the OP_CF_STOP instruction to leave the context frame */
PH7_VmEmitInstr(pGen->pVm, nLine, PH7_OP_CF_STOP, 0, 0, 0, 0);
/* Statement successfully compiled */
return SXRET_OK;
}