ficl: add uIsGreater word

For some reason we have u< but not u>, fix it.
This commit is contained in:
Toomas Soome 2019-09-05 09:04:48 +00:00
parent b27524973c
commit 0bd5d36798

View File

@ -1930,6 +1930,18 @@ static void isGreater(FICL_VM *pVM)
return;
}
static void uIsGreater(FICL_VM *pVM)
{
FICL_UNS u1, u2;
#if FICL_ROBUST > 1
vmCheckStack(pVM, 2, 1);
#endif
u2 = stackPopUNS(pVM->pStack);
u1 = stackPopUNS(pVM->pStack);
PUSHINT(FICL_BOOL(u1 > u2));
return;
}
static void bitwiseAnd(FICL_VM *pVM)
{
CELL x, y;
@ -4975,6 +4987,7 @@ void ficlCompileCore(FICL_SYSTEM *pSys)
dictAppendWord(dp, "type", type, FW_DEFAULT);
dictAppendWord(dp, "u.", uDot, FW_DEFAULT);
dictAppendWord(dp, "u<", uIsLess, FW_DEFAULT);
dictAppendWord(dp, "u>", uIsGreater, FW_DEFAULT);
dictAppendWord(dp, "um*", umStar, FW_DEFAULT);
dictAppendWord(dp, "um/mod", umSlashMod, FW_DEFAULT);
dictAppendWord(dp, "unloop", unloopCo, FW_COMPILE);