MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / traverseproto

Function traverseproto

third-party/lua-5.5.0/src/lgc.c:646–658  ·  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

644** NULL, so the use of 'markobjectN')
645*/
646static l_mem traverseproto (global_State *g, Proto *f) {
647 int i;
648 markobjectN(g, f->source);
649 for (i = 0; i < f->sizek; i++) /* mark literals */
650 markvalue(g, &f->k[i]);
651 for (i = 0; i < f->sizeupvalues; i++) /* mark upvalue names */
652 markobjectN(g, f->upvalues[i].name);
653 for (i = 0; i < f->sizep; i++) /* mark nested protos */
654 markobjectN(g, f->p[i]);
655 for (i = 0; i < f->sizelocvars; i++) /* mark local-variable names */
656 markobjectN(g, f->locvars[i].varname);
657 return 1 + f->sizek + f->sizeupvalues + f->sizep + f->sizelocvars;
658}
659
660
661static l_mem traverseCclosure (global_State *g, CClosure *cl) {

Callers 1

propagatemarkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected