MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / traverseproto

Function traverseproto

3rd/lua-5.4.3/src/lgc.c:572–584  ·  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

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

Callers 1

propagatemarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected