Initial support for char data type.
All checks were successful
The build was successful.

This commit is contained in:
2018-11-26 20:37:51 +01:00
parent 8782b9c25b
commit d65a529d21
6 changed files with 89 additions and 1 deletions

View File

@@ -2205,6 +2205,23 @@ static sxi32 VmByteCodeExec(
PH7_MemObjToBool(pTos);
}
break;
/*
* CVT_CHAR: * * *
*
* Force the top of the stack to be a char.
*/
case PH7_OP_CVT_CHAR:
#ifdef UNTRUST
if(pTos < pStack) {
goto Abort;
}
#endif
if((pTos->iFlags & MEMOBJ_CHAR) == 0) {
PH7_MemObjToChar(pTos);
}
/* Invalidate any prior representation */
MemObjSetType(pTos, MEMOBJ_CHAR);
break;
/*
* CVT_NULL: * * *
*