MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / traverseproto

Function traverseproto

deps/lua/src/lgc.c:203–220  ·  view source on GitHub ↗

** All marks are conditional because a GC may happen while the ** prototype is still being created */

Source from the content-addressed store, hash-verified

201** prototype is still being created
202*/
203static void traverseproto (global_State *g, Proto *f) {
204 int i;
205 if (f->source) stringmark(f->source);
206 for (i=0; i<f->sizek; i++) /* mark literals */
207 markvalue(g, &f->k[i]);
208 for (i=0; i<f->sizeupvalues; i++) { /* mark upvalue names */
209 if (f->upvalues[i])
210 stringmark(f->upvalues[i]);
211 }
212 for (i=0; i<f->sizep; i++) { /* mark nested protos */
213 if (f->p[i])
214 markobject(g, f->p[i]);
215 }
216 for (i=0; i<f->sizelocvars; i++) { /* mark local-variable names */
217 if (f->locvars[i].varname)
218 stringmark(f->locvars[i].varname);
219 }
220}
221
222
223

Callers 1

propagatemarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected