Improve assertions.

This commit is contained in:
Mike Pall
2020-06-13 00:52:54 +02:00
parent 8b55054473
commit 8ae5170cdc
71 changed files with 1363 additions and 927 deletions

View File

@@ -413,11 +413,12 @@ static LJ_AINLINE IRType itype2irt(const TValue *tv)
static LJ_AINLINE uint32_t irt_toitype_(IRType t)
{
lua_assert(!LJ_64 || LJ_GC64 || t != IRT_LIGHTUD);
lj_assertX(!LJ_64 || LJ_GC64 || t != IRT_LIGHTUD,
"no plain type tag for lightuserdata");
if (LJ_DUALNUM && t > IRT_NUM) {
return LJ_TISNUM;
} else {
lua_assert(t <= IRT_NUM);
lj_assertX(t <= IRT_NUM, "no plain type tag for IR type %d", t);
return ~(uint32_t)t;
}
}