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

Function luaF_close

third-party/lua-5.5.0/src/lfunc.c:230–240  ·  view source on GitHub ↗

** Close all upvalues and to-be-closed variables up to the given stack ** level. Return restored 'level'. */

Source from the content-addressed store, hash-verified

228** level. Return restored 'level'.
229*/
230StkId luaF_close (lua_State *L, StkId level, TStatus status, int yy) {
231 ptrdiff_t levelrel = savestack(L, level);
232 luaF_closeupval(L, level); /* first, close the upvalues */
233 while (L->tbclist.p >= level) { /* traverse tbc's down to that level */
234 StkId tbc = L->tbclist.p; /* get variable index */
235 poptbclist(L); /* remove it from list */
236 prepcallclosemth(L, tbc, status, yy); /* close variable */
237 level = restorestack(L, levelrel);
238 }
239 return level;
240}
241
242
243Proto *luaF_newproto (lua_State *L) {

Callers 6

luaV_executeFunction · 0.70
moveresultsFunction · 0.70
finishpcallkFunction · 0.70
closepauxFunction · 0.70
lua_settopFunction · 0.70
lua_closeslotFunction · 0.70

Calls 3

luaF_closeupvalFunction · 0.70
poptbclistFunction · 0.70
prepcallclosemthFunction · 0.70

Tested by

no test coverage detected