MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaK_checkstack

Function luaK_checkstack

depends/lua/src/lcode.c:361–369  ·  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

359** in field 'maxstacksize'
360*/
361void luaK_checkstack (FuncState *fs, int n) {
362 int newstack = fs->freereg + n;
363 if (newstack > fs->f->maxstacksize) {
364 if (newstack >= MAXREGS)
365 luaX_syntaxerror(fs->ls,
366 "function or expression needs too many registers");
367 fs->f->maxstacksize = cast_byte(newstack);
368 }
369}
370
371
372/*

Callers 2

forlistFunction · 0.85
luaK_reserveregsFunction · 0.85

Calls 1

luaX_syntaxerrorFunction · 0.85

Tested by

no test coverage detected