MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / traverseproto

Function traverseproto

lib/lua/src/lgc.c:580–592  ·  view source on GitHub ↗

** Traverse a prototype. (While a prototype is being build, its ** arrays can be larger than needed; the extra slots are filled with ** NULL, so the use of 'markobjectN') */

Source from the content-addressed store, hash-verified

578** NULL, so the use of 'markobjectN')
579*/
580static int traverseproto (global_State *g, Proto *f) {
581 int i;
582 markobjectN(g, f->source);
583 for (i = 0; i < f->sizek; i++) /* mark literals */
584 markvalue(g, &f->k[i]);
585 for (i = 0; i < f->sizeupvalues; i++) /* mark upvalue names */
586 markobjectN(g, f->upvalues[i].name);
587 for (i = 0; i < f->sizep; i++) /* mark nested protos */
588 markobjectN(g, f->p[i]);
589 for (i = 0; i < f->sizelocvars; i++) /* mark local-variable names */
590 markobjectN(g, f->locvars[i].varname);
591 return 1 + f->sizek + f->sizeupvalues + f->sizep + f->sizelocvars;
592}
593
594
595static int traverseCclosure (global_State *g, CClosure *cl) {

Callers 1

propagatemarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected