MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / open_func

Function open_func

src/Chain/libraries/glua/lparser.cpp:548–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546
547
548static void open_func(LexState *ls, FuncState *fs, BlockCnt *bl) {
549 Proto *f;
550 fs->prev = ls->fs; /* linked list of funcstates */
551 fs->ls = ls;
552 ls->fs = fs;
553 fs->pc = 0;
554 fs->lasttarget = 0;
555 fs->jpc = NO_JUMP;
556 fs->freereg = 0;
557 fs->nk = 0;
558 fs->np = 0;
559 fs->nups = 0;
560 fs->nlocvars = 0;
561 fs->nactvar = 0;
562 fs->firstlocal = ls->dyd->actvar.n;
563 fs->bl = nullptr;
564 f = fs->f;
565 f->source = ls->source;
566 f->maxstacksize = 2; /* registers 0/1 are always valid */
567 enterblock(fs, bl, 0);
568}
569
570
571static void close_func(LexState *ls) {

Callers 2

bodyFunction · 0.85
mainfuncFunction · 0.85

Calls 1

enterblockFunction · 0.85

Tested by

no test coverage detected