Lines Matching refs:level

65 static UpVal *newupval (lua_State *L, int tbc, StkId level, UpVal **prev) {  in newupval()  argument
69 uv->v = s2v(level); /* current value lives in the stack */ in newupval()
88 UpVal *luaF_findupval (lua_State *L, StkId level) { in luaF_findupval() argument
92 while ((p = *pp) != NULL && uplevel(p) >= level) { /* search for it */ in luaF_findupval()
94 if (uplevel(p) == level) /* corresponding upvalue? */ in luaF_findupval()
99 return newupval(L, 0, level, pp); in luaF_findupval()
130 static void varerror (lua_State *L, StkId level, const char *msg) { in varerror() argument
131 int idx = cast_int(level - L->ci->func); in varerror()
150 static int callclosemth (lua_State *L, StkId level, int status) { in callclosemth() argument
151 TValue *uv = s2v(level); /* value being closed */ in callclosemth()
156 varerror(L, level, "attempt to close non-closable variable '%s'"); in callclosemth()
160 level++; /* space for error message */ in callclosemth()
161 oldtop = savestack(L, level + 1); /* top will be after that */ in callclosemth()
162 luaD_seterrorobj(L, status, level); /* set error message */ in callclosemth()
163 if (prepclosingmethod(L, uv, s2v(level))) { /* something to call? */ in callclosemth()
194 void luaF_newtbcupval (lua_State *L, StkId level) { in luaF_newtbcupval() argument
195 TValue *obj = s2v(level); in luaF_newtbcupval()
196 lua_assert(L->openupval == NULL || uplevel(L->openupval) < level); in luaF_newtbcupval()
201 varerror(L, level, "variable '%s' got a non-closable value"); in luaF_newtbcupval()
202 status = luaD_rawrunprotected(L, trynewtbcupval, level); in luaF_newtbcupval()
205 luaD_seterrorobj(L, LUA_ERRMEM, level + 1); /* save error message */ in luaF_newtbcupval()
207 prepclosingmethod(L, s2v(level), s2v(level + 1)); in luaF_newtbcupval()
223 int luaF_close (lua_State *L, StkId level, int status) { in luaF_close() argument
225 while ((uv = L->openupval) != NULL && uplevel(uv) >= level) { in luaF_close()
230 ptrdiff_t levelrel = savestack(L, level); in luaF_close()
232 level = restorestack(L, levelrel); in luaF_close()