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

Function luaK_checkstack

extlibs/lua/src/lcode.c:474–482  ·  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

472** in field 'maxstacksize'
473*/
474void luaK_checkstack (FuncState *fs, int n) {
475 int newstack = fs->freereg + n;
476 if (newstack > fs->f->maxstacksize) {
477 if (newstack >= MAXREGS)
478 luaX_syntaxerror(fs->ls,
479 "function or expression needs too many registers");
480 fs->f->maxstacksize = cast_byte(newstack);
481 }
482}
483
484
485/*

Callers 2

forlistFunction · 0.85
luaK_reserveregsFunction · 0.85

Calls 1

luaX_syntaxerrorFunction · 0.85

Tested by

no test coverage detected