Lines Matching refs:curr
829 GCObject *curr = *p; in sweeplist() local
830 int marked = curr->marked; in sweeplist()
832 *p = curr->next; /* remove 'curr' from list */ in sweeplist()
833 freeobj(L, curr); /* erase 'curr' */ in sweeplist()
836 curr->marked = cast_byte((marked & ~maskgcbits) | white); in sweeplist()
837 p = &curr->next; /* go to next element */ in sweeplist()
973 GCObject *curr; in separatetobefnz() local
976 while ((curr = *p) != g->finobjold1) { /* traverse all finalizable objects */ in separatetobefnz()
977 lua_assert(tofinalize(curr)); in separatetobefnz()
978 if (!(iswhite(curr) || all)) /* not being collected? */ in separatetobefnz()
979 p = &curr->next; /* don't bother with it */ in separatetobefnz()
981 if (curr == g->finobjsur) /* removing 'finobjsur'? */ in separatetobefnz()
982 g->finobjsur = curr->next; /* correct it */ in separatetobefnz()
983 *p = curr->next; /* remove 'curr' from 'finobj' list */ in separatetobefnz()
984 curr->next = *lastnext; /* link at the end of 'tobefnz' list */ in separatetobefnz()
985 *lastnext = curr; in separatetobefnz()
986 lastnext = &curr->next; in separatetobefnz()
1078 GCObject *curr; in sweep2old() local
1080 while ((curr = *p) != NULL) { in sweep2old()
1081 if (iswhite(curr)) { /* is 'curr' dead? */ in sweep2old()
1082 lua_assert(isdead(g, curr)); in sweep2old()
1083 *p = curr->next; /* remove 'curr' from list */ in sweep2old()
1084 freeobj(L, curr); /* erase 'curr' */ in sweep2old()
1087 setage(curr, G_OLD); in sweep2old()
1088 if (curr->tt == LUA_VTHREAD) { /* threads must be watched */ in sweep2old()
1089 lua_State *th = gco2th(curr); in sweep2old()
1092 else if (curr->tt == LUA_VUPVAL && upisopen(gco2upv(curr))) in sweep2old()
1093 set2gray(curr); /* open upvalues are always gray */ in sweep2old()
1095 nw2black(curr); in sweep2old()
1096 p = &curr->next; /* go to next element */ in sweep2old()
1125 GCObject *curr; in sweepgen() local
1126 while ((curr = *p) != limit) { in sweepgen()
1127 if (iswhite(curr)) { /* is 'curr' dead? */ in sweepgen()
1128 lua_assert(!isold(curr) && isdead(g, curr)); in sweepgen()
1129 *p = curr->next; /* remove 'curr' from list */ in sweepgen()
1130 freeobj(L, curr); /* erase 'curr' */ in sweepgen()
1133 if (getage(curr) == G_NEW) { /* new objects go back to white */ in sweepgen()
1134 int marked = curr->marked & ~maskgcbits; /* erase GC bits */ in sweepgen()
1135 curr->marked = cast_byte(marked | G_SURVIVAL | white); in sweepgen()
1138 setage(curr, nextage[getage(curr)]); in sweepgen()
1139 if (getage(curr) == G_OLD1 && *pfirstold1 == NULL) in sweepgen()
1140 *pfirstold1 = curr; /* first OLD1 object in the list */ in sweepgen()
1142 p = &curr->next; /* go to next element */ in sweepgen()
1171 GCObject *curr; in correctgraylist() local
1172 while ((curr = *p) != NULL) { in correctgraylist()
1173 GCObject **next = getgclist(curr); in correctgraylist()
1174 if (iswhite(curr)) in correctgraylist()
1176 else if (getage(curr) == G_TOUCHED1) { /* touched in this cycle? */ in correctgraylist()
1177 lua_assert(isgray(curr)); in correctgraylist()
1178 nw2black(curr); /* make it black, for next barrier */ in correctgraylist()
1179 changeage(curr, G_TOUCHED1, G_TOUCHED2); in correctgraylist()
1182 else if (curr->tt == LUA_VTHREAD) { in correctgraylist()
1183 lua_assert(isgray(curr)); in correctgraylist()
1187 lua_assert(isold(curr)); /* young objects should be white here */ in correctgraylist()
1188 if (getage(curr) == G_TOUCHED2) /* advance from TOUCHED2... */ in correctgraylist()
1189 changeage(curr, G_TOUCHED2, G_OLD); /* ... to OLD */ in correctgraylist()
1190 nw2black(curr); /* make object black (to be removed) */ in correctgraylist()