Always emit OP_JMPLFE as goto can be used inside a loop and frame has to be left.
Tüm denetlemeler başarılı oldu
The build was successful.

Bu işleme şunda yer alıyor:
Rafal Kupiec 2019-05-03 10:55:57 +02:00
ebeveyn 03fc167be1
işleme e6b7f1be2c
İmzalayan: belliash
GPG Anahtar Kimliği: 4E829243E0CFE6B4

Dosyayı Görüntüle

@ -1523,6 +1523,8 @@ static sxi32 PH7_CompileGoto(ph7_gen_state *pGen)
} else { } else {
sJump.pFunc = 0; sJump.pFunc = 0;
} }
/* Make sure there will not stay any loop frame opened (i.e. goto inside a loop) */
PH7_VmEmitInstr(pGen->pVm, sJump.nLine, PH7_OP_JMPLFE, 0, 0, 0, 0);
/* Emit the unconditional jump */ /* Emit the unconditional jump */
if(SXRET_OK == PH7_VmEmitInstr(pGen->pVm, sJump.nLine, PH7_OP_JMP, 0, 0, 0, &sJump.nInstrIdx)) { if(SXRET_OK == PH7_VmEmitInstr(pGen->pVm, sJump.nLine, PH7_OP_JMP, 0, 0, 0, &sJump.nInstrIdx)) {
SySetPut(&pGen->aGoto, (const void *)&sJump); SySetPut(&pGen->aGoto, (const void *)&sJump);