MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaK_checkstack

Function luaK_checkstack

third-party/lua-5.4.6/src/lcode.c:467–475  ·  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

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

Callers 2

forlistFunction · 0.70
luaK_reserveregsFunction · 0.70

Calls 1

luaX_syntaxerrorFunction · 0.70

Tested by

no test coverage detected