MCPcopy Create free account
hub / github.com/Tencent/sluaunreal / luaK_checkstack

Function luaK_checkstack

Plugins/slua_unreal/External/lua/lcode.cpp:359–367  ·  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

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

Callers 2

luaK_reserveregsFunction · 0.85
forlistFunction · 0.85

Calls 1

luaX_syntaxerrorFunction · 0.85

Tested by

no test coverage detected