Browse Source

This is a compiler task to fill key and value variables names.

release/v0.1
Rafal Kupiec 1 year ago
parent
commit
1156519af6
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 0 additions and 25 deletions
  1. +0
    -25
      engine/vm.c

+ 0
- 25
engine/vm.c View File

@ -4049,31 +4049,6 @@ static sxi32 VmByteCodeExec(
goto Abort;
}
#endif
if(SyStringLength(&pInfo->sValue) < 1) {
/* Take the variable name from the top of the stack */
if((pTos->iFlags & MEMOBJ_STRING) == 0) {
/* Force a string cast */
PH7_MemObjToString(pTos);
}
/* Duplicate name */
if(SyBlobLength(&pTos->sBlob) > 0) {
pName = SyMemBackendDup(&pVm->sAllocator, SyBlobData(&pTos->sBlob), SyBlobLength(&pTos->sBlob));
SyStringInitFromBuf(&pInfo->sValue, pName, SyBlobLength(&pTos->sBlob));
}
VmPopOperand(&pTos, 1);
}
if((pInfo->iFlags & PH7_4EACH_STEP_KEY) && SyStringLength(&pInfo->sKey) < 1) {
if((pTos->iFlags & MEMOBJ_STRING) == 0) {
/* Force a string cast */
PH7_MemObjToString(pTos);
}
/* Duplicate name */
if(SyBlobLength(&pTos->sBlob) > 0) {
pName = SyMemBackendDup(&pVm->sAllocator, SyBlobData(&pTos->sBlob), SyBlobLength(&pTos->sBlob));
SyStringInitFromBuf(&pInfo->sKey, pName, SyBlobLength(&pTos->sBlob));
}
VmPopOperand(&pTos, 1);
}
/* Make sure we are dealing with a hashmap aka 'array' or an object */
if((pTos->iFlags & (MEMOBJ_HASHMAP | MEMOBJ_OBJ)) == 0 || SyStringLength(&pInfo->sValue) < 1) {
/* Jump out of the loop */

Loading…
Cancel
Save