static void invalidaterefs (lua_State *L) { int n = L->refSize; int i; for (i=0; i<n; i++) { struct Ref *r = &L->refArray[i]; if (r->st == HOLD && !hasmark(&r->o)) r->st = COLLECTED; LUA_ASSERT((r->st == LOCK && hasmark(&r->o)) || (r->st == HOLD && hasmark(&r->o)) || r->st == COLLECTED || r->st == NONEXT || (r->st < n && VALIDLINK(L, L->refArray[r->st].st, n)), "inconsistent ref table"); } LUA_ASSERT(VALIDLINK(L, L->refFree, n), "inconsistent ref table"); }
static void invalidaterefs (lua_State *L) { int n = L->refSize; int i; for (i=0; i<n; i++) { struct Ref *r = &L->refArray[i]; if (r->st == HOLD && !hasmark(&r->o)) r->st = COLLECTED; /* ** this test must be disabled, since the refArray could have been ** modified during the garbage collection. LUA_ASSERT((r->st == LOCK && hasmark(&r->o)) || (r->st == HOLD && hasmark(&r->o)) || r->st == COLLECTED || r->st == NONEXT || (r->st < n && VALIDLINK(L, L->refArray[r->st].st, n)), "inconsistent ref table"); */ } LUA_ASSERT(VALIDLINK(L, L->refFree, n), "inconsistent ref table"); }