Do not try to resolve constants when OP_MEMBER is next instruction on the stack.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
d3ae1c1bf4
commit
17e0fb4653
|
@ -2431,6 +2431,7 @@ static sxi32 VmByteCodeExec(
|
||||||
pTos++;
|
pTos++;
|
||||||
if((pObj = (ph7_value *)SySetAt(&pVm->aLitObj, pInstr->iP2)) != 0) {
|
if((pObj = (ph7_value *)SySetAt(&pVm->aLitObj, pInstr->iP2)) != 0) {
|
||||||
if(pInstr->iP1 == 1 && SyBlobLength(&pObj->sBlob) <= 64) {
|
if(pInstr->iP1 == 1 && SyBlobLength(&pObj->sBlob) <= 64) {
|
||||||
|
if(pInstr[1].iOp != PH7_OP_MEMBER && pInstr[1].iOp != PH7_OP_NEW) {
|
||||||
/* Point to the top active frame */
|
/* Point to the top active frame */
|
||||||
VmFrame *pFrame = pVm->pFrame;
|
VmFrame *pFrame = pVm->pFrame;
|
||||||
while(pFrame->pParent && (pFrame->iFlags & VM_FRAME_EXCEPTION)) {
|
while(pFrame->pParent && (pFrame->iFlags & VM_FRAME_EXCEPTION)) {
|
||||||
|
@ -2460,11 +2461,12 @@ static sxi32 VmByteCodeExec(
|
||||||
/* Mark as constant */
|
/* Mark as constant */
|
||||||
pTos->nIdx = SXU32_HIGH;
|
pTos->nIdx = SXU32_HIGH;
|
||||||
break;
|
break;
|
||||||
} else if(pInstr[1].iOp != PH7_OP_MEMBER && pInstr[1].iOp != PH7_OP_NEW && pInstr[2].iOp != PH7_OP_MEMBER && pInstr[1].iOp != PH7_OP_NEW) {
|
} else if(pInstr[2].iOp != PH7_OP_MEMBER && pInstr[2].iOp != PH7_OP_NEW) {
|
||||||
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
|
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
|
||||||
"Call to undefined constant ‘%s’", SyBlobData(&pObj->sBlob));
|
"Call to undefined constant ‘%s’", SyBlobData(&pObj->sBlob));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
PH7_MemObjLoad(pObj, pTos);
|
PH7_MemObjLoad(pObj, pTos);
|
||||||
} else {
|
} else {
|
||||||
/* Set a NULL value */
|
/* Set a NULL value */
|
||||||
|
|
Loading…
Reference in New Issue