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

Function open_func

extlibs/lua/src/lparser.c:711–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

bodyFunction · 0.85
mainfuncFunction · 0.85

Calls 1

enterblockFunction · 0.85

Tested by

no test coverage detected