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

Function open_func

3rd/lua-5.4.3/src/lparser.c:717–741  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715
716
717static void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) {
718 Proto *f = fs->f;
719 fs->prev = ls->fs; /* linked list of funcstates */
720 fs->ls = ls;
721 ls->fs = fs;
722 fs->pc = 0;
723 fs->previousline = f->linedefined;
724 fs->iwthabs = 0;
725 fs->lasttarget = 0;
726 fs->freereg = 0;
727 fs->nk = 0;
728 fs->nabslineinfo = 0;
729 fs->np = 0;
730 fs->nups = 0;
731 fs->ndebugvars = 0;
732 fs->nactvar = 0;
733 fs->needclose = 0;
734 fs->firstlocal = ls->dyd->actvar.n;
735 fs->firstlabel = ls->dyd->label.n;
736 fs->bl = NULL;
737 f->source = ls->source;
738 luaC_objbarrier(ls->L, f, f->source);
739 f->maxstacksize = 2; /* registers 0/1 are always valid */
740 enterblock(fs, bl, 0);
741}
742
743
744static void close_func (LexState *ls) {

Callers 2

bodyFunction · 0.85
mainfuncFunction · 0.85

Calls 1

enterblockFunction · 0.85

Tested by

no test coverage detected