MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / open_func

Function open_func

xrepo/packages/l/lua/port/lua/src/lparser.c:728–752  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

726
727
728static void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) {
729 Proto *f = fs->f;
730 fs->prev = ls->fs; /* linked list of funcstates */
731 fs->ls = ls;
732 ls->fs = fs;
733 fs->pc = 0;
734 fs->previousline = f->linedefined;
735 fs->iwthabs = 0;
736 fs->lasttarget = 0;
737 fs->freereg = 0;
738 fs->nk = 0;
739 fs->nabslineinfo = 0;
740 fs->np = 0;
741 fs->nups = 0;
742 fs->ndebugvars = 0;
743 fs->nactvar = 0;
744 fs->needclose = 0;
745 fs->firstlocal = ls->dyd->actvar.n;
746 fs->firstlabel = ls->dyd->label.n;
747 fs->bl = NULL;
748 f->source = ls->source;
749 luaC_objbarrier(ls->L, f, f->source);
750 f->maxstacksize = 2; /* registers 0/1 are always valid */
751 enterblock(fs, bl, 0);
752}
753
754
755static void close_func (LexState *ls) {

Callers 2

bodyFunction · 0.85
mainfuncFunction · 0.85

Calls 1

enterblockFunction · 0.85

Tested by

no test coverage detected