MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaK_checkstack

Function luaK_checkstack

3rd/lua-5.4.3/src/lcode.c:465–473  ·  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

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

Callers 2

forlistFunction · 0.85
luaK_reserveregsFunction · 0.85

Calls 1

luaX_syntaxerrorFunction · 0.85

Tested by

no test coverage detected