MCPcopy Create free account
hub / github.com/F-Stack/f-stack / traverseproto

Function traverseproto

freebsd/contrib/openzfs/module/lua/lgc.c:456–475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454
455
456static int traverseproto (global_State *g, Proto *f) {
457 int i;
458 if (f->cache && iswhite(obj2gco(f->cache)))
459 f->cache = NULL; /* allow cache to be collected */
460 markobject(g, f->source);
461 for (i = 0; i < f->sizek; i++) /* mark literals */
462 markvalue(g, &f->k[i]);
463 for (i = 0; i < f->sizeupvalues; i++) /* mark upvalue names */
464 markobject(g, f->upvalues[i].name);
465 for (i = 0; i < f->sizep; i++) /* mark nested protos */
466 markobject(g, f->p[i]);
467 for (i = 0; i < f->sizelocvars; i++) /* mark local-variable names */
468 markobject(g, f->locvars[i].varname);
469 return sizeof(Proto) + sizeof(Instruction) * f->sizecode +
470 sizeof(Proto *) * f->sizep +
471 sizeof(TValue) * f->sizek +
472 sizeof(int) * f->sizelineinfo +
473 sizeof(LocVar) * f->sizelocvars +
474 sizeof(Upvaldesc) * f->sizeupvalues;
475}
476
477
478static lu_mem traverseCclosure (global_State *g, CClosure *cl) {

Callers 1

propagatemarkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected