Lines Matching refs:curr
823 GCObject *curr = *p; in sweeplist() local
824 int marked = curr->marked; in sweeplist()
826 *p = curr->next; /* remove 'curr' from list */ in sweeplist()
827 freeobj(L, curr); /* erase 'curr' */ in sweeplist()
830 curr->marked = cast_byte((marked & ~maskgcbits) | white); in sweeplist()
831 p = &curr->next; /* go to next element */ in sweeplist()
967 GCObject *curr; in separatetobefnz() local
970 while ((curr = *p) != g->finobjold1) { /* traverse all finalizable objects */ in separatetobefnz()
971 lua_assert(tofinalize(curr)); in separatetobefnz()
972 if (!(iswhite(curr) || all)) /* not being collected? */ in separatetobefnz()
973 p = &curr->next; /* don't bother with it */ in separatetobefnz()
975 if (curr == g->finobjsur) /* removing 'finobjsur'? */ in separatetobefnz()
976 g->finobjsur = curr->next; /* correct it */ in separatetobefnz()
977 *p = curr->next; /* remove 'curr' from 'finobj' list */ in separatetobefnz()
978 curr->next = *lastnext; /* link at the end of 'tobefnz' list */ in separatetobefnz()
979 *lastnext = curr; in separatetobefnz()
980 lastnext = &curr->next; in separatetobefnz()
1053 GCObject *curr; in sweep2old() local
1055 while ((curr = *p) != NULL) { in sweep2old()
1056 if (iswhite(curr)) { /* is 'curr' dead? */ in sweep2old()
1057 lua_assert(isdead(g, curr)); in sweep2old()
1058 *p = curr->next; /* remove 'curr' from list */ in sweep2old()
1059 freeobj(L, curr); /* erase 'curr' */ in sweep2old()
1062 setage(curr, G_OLD); in sweep2old()
1063 if (curr->tt == LUA_VTHREAD) { /* threads must be watched */ in sweep2old()
1064 lua_State *th = gco2th(curr); in sweep2old()
1067 else if (curr->tt == LUA_VUPVAL && upisopen(gco2upv(curr))) in sweep2old()
1068 set2gray(curr); /* open upvalues are always gray */ in sweep2old()
1070 nw2black(curr); in sweep2old()
1071 p = &curr->next; /* go to next element */ in sweep2old()
1100 GCObject *curr; in sweepgen() local
1101 while ((curr = *p) != limit) { in sweepgen()
1102 if (iswhite(curr)) { /* is 'curr' dead? */ in sweepgen()
1103 lua_assert(!isold(curr) && isdead(g, curr)); in sweepgen()
1104 *p = curr->next; /* remove 'curr' from list */ in sweepgen()
1105 freeobj(L, curr); /* erase 'curr' */ in sweepgen()
1108 if (getage(curr) == G_NEW) { /* new objects go back to white */ in sweepgen()
1109 int marked = curr->marked & ~maskgcbits; /* erase GC bits */ in sweepgen()
1110 curr->marked = cast_byte(marked | G_SURVIVAL | white); in sweepgen()
1113 setage(curr, nextage[getage(curr)]); in sweepgen()
1114 if (getage(curr) == G_OLD1 && *pfirstold1 == NULL) in sweepgen()
1115 *pfirstold1 = curr; /* first OLD1 object in the list */ in sweepgen()
1117 p = &curr->next; /* go to next element */ in sweepgen()
1146 GCObject *curr; in correctgraylist() local
1147 while ((curr = *p) != NULL) { in correctgraylist()
1148 GCObject **next = getgclist(curr); in correctgraylist()
1149 if (iswhite(curr)) in correctgraylist()
1151 else if (getage(curr) == G_TOUCHED1) { /* touched in this cycle? */ in correctgraylist()
1152 lua_assert(isgray(curr)); in correctgraylist()
1153 nw2black(curr); /* make it black, for next barrier */ in correctgraylist()
1154 changeage(curr, G_TOUCHED1, G_TOUCHED2); in correctgraylist()
1157 else if (curr->tt == LUA_VTHREAD) { in correctgraylist()
1158 lua_assert(isgray(curr)); in correctgraylist()
1162 lua_assert(isold(curr)); /* young objects should be white here */ in correctgraylist()
1163 if (getage(curr) == G_TOUCHED2) /* advance from TOUCHED2... */ in correctgraylist()
1164 changeage(curr, G_TOUCHED2, G_OLD); /* ... to OLD */ in correctgraylist()
1165 nw2black(curr); /* make object black (to be removed) */ in correctgraylist()