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

@@ -152,7 +152,8 @@ typedef uint32_t RegCost;
/* Return the address of an exit stub. */
static LJ_AINLINE char *exitstub_addr_(char **group, uint32_t exitno)
{
lua_assert(group[exitno / EXITSTUBS_PER_GROUP] != NULL);
lj_assertX(group[exitno / EXITSTUBS_PER_GROUP] != NULL,
"exit stub group for exit %d uninitialized", exitno);
return (char *)group[exitno / EXITSTUBS_PER_GROUP] +
EXITSTUB_SPACING*(exitno % EXITSTUBS_PER_GROUP);
}