MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / open_func

Function open_func

lib/lua/src/lparser.c:729–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

bodyFunction · 0.85
mainfuncFunction · 0.85

Calls 1

enterblockFunction · 0.85

Tested by

no test coverage detected