MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / traverseproto

Function traverseproto

extlibs/lua/src/lgc.c:523–535  ·  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

521** NULL, so the use of 'markobjectN')
522*/
523static int traverseproto (global_State *g, Proto *f) {
524 int i;
525 markobjectN(g, f->source);
526 for (i = 0; i < f->sizek; i++) /* mark literals */
527 markvalue(g, &f->k[i]);
528 for (i = 0; i < f->sizeupvalues; i++) /* mark upvalue names */
529 markobjectN(g, f->upvalues[i].name);
530 for (i = 0; i < f->sizep; i++) /* mark nested protos */
531 markobjectN(g, f->p[i]);
532 for (i = 0; i < f->sizelocvars; i++) /* mark local-variable names */
533 markobjectN(g, f->locvars[i].varname);
534 return 1 + f->sizek + f->sizeupvalues + f->sizep + f->sizelocvars;
535}
536
537
538static int traverseCclosure (global_State *g, CClosure *cl) {

Callers 1

propagatemarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected