MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / luaK_checkstack

Function luaK_checkstack

lua/src/lcode.c:466–474  ·  view source on GitHub ↗

** Check register-stack level, keeping track of its maximum size ** in field 'maxstacksize' */

Source from the content-addressed store, hash-verified

464** in field 'maxstacksize'
465*/
466void luaK_checkstack (FuncState *fs, int n) {
467 int newstack = fs->freereg + n;
468 if (newstack > fs->f->maxstacksize) {
469 if (newstack >= MAXREGS)
470 luaX_syntaxerror(fs->ls,
471 "function or expression needs too many registers");
472 fs->f->maxstacksize = cast_byte(newstack);
473 }
474}
475
476
477/*

Callers 2

forlistFunction · 0.85
luaK_reserveregsFunction · 0.85

Calls 1

luaX_syntaxerrorFunction · 0.85

Tested by

no test coverage detected