Try to optimize the code a bit.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-04-03 13:43:31 +02:00
parent 9acd6fbcb2
commit 5eeceb6927
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 5 additions and 5 deletions

View File

@ -4836,14 +4836,14 @@ static sxi32 VmByteCodeExec(
if(pObj == 0 || pVal == 0) {
PH7_VmMemoryError(&(*pVm));
}
MemObjSetType(pObj, pStatic->iFlags);
if(SySetUsed(&pStatic->aByteCode) > 0) {
/* Evaluate initialization expression (Any complex expression) */
VmLocalExec(&(*pVm), &pStatic->aByteCode, pVal);
}
MemObjSetType(pObj, pStatic->iFlags);
rc = PH7_MemObjSafeStore(pVal, pObj);
if(rc != SXRET_OK) {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Cannot assign a value of incompatible type to variable '$%z'", &pStatic->sName);
rc = PH7_MemObjSafeStore(pVal, pObj);
if(rc != SXRET_OK) {
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Cannot assign a value of incompatible type to variable '$%z'", &pStatic->sName);
}
}
pObj->nIdx = pStatic->nIdx;
}