** All marks are conditional because a GC may happen while the ** prototype is still being created */
| 6203 | ** prototype is still being created |
| 6204 | */ |
| 6205 | static void traverseproto (global_State *g, Proto *f) { |
| 6206 | int i; |
| 6207 | if (f->source) stringmark(f->source); |
| 6208 | for (i=0; i<f->sizek; i++) /* mark literals */ |
| 6209 | markvalue(g, &f->k[i]); |
| 6210 | for (i=0; i<f->sizeupvalues; i++) { /* mark upvalue names */ |
| 6211 | if (f->upvalues[i]) |
| 6212 | stringmark(f->upvalues[i]); |
| 6213 | } |
| 6214 | for (i=0; i<f->sizep; i++) { /* mark nested protos */ |
| 6215 | if (f->p[i]) |
| 6216 | markobject(g, f->p[i]); |
| 6217 | } |
| 6218 | for (i=0; i<f->sizelocvars; i++) { /* mark local-variable names */ |
| 6219 | if (f->locvars[i].varname) |
| 6220 | stringmark(f->locvars[i].varname); |
| 6221 | } |
| 6222 | } |
| 6223 | |
| 6224 | |
| 6225 |