Lines Matching refs:top

107       setobjs2s(L, oldtop, L->top.p - 1);  /* error message on current top */  in luaD_seterrorobj()
111 L->top.p = oldtop + 1; in luaD_seterrorobj()
124 setobjs2s(L, g->mainthread->top.p++, L->top.p - 1); /* copy error obj. */ in luaD_throw()
168 L->top.offset = savestack(L, L->top.p); in relstack()
173 ci->top.offset = savestack(L, ci->top.p); in relstack()
185 L->top.p = restorestack(L, L->top.offset); in correctstack()
190 ci->top.p = restorestack(L, ci->top.offset); in correctstack()
255 int needed = cast_int(L->top.p - L->stack.p) + n; in luaD_growstack()
279 StkId lim = L->top.p; in stackinuse()
281 if (lim < ci->top.p) lim = ci->top.p; in stackinuse()
317 L->top.p++; in luaD_inctop()
334 ptrdiff_t top = savestack(L, L->top.p); /* preserve original 'top' */ in luaD_hook() local
335 ptrdiff_t ci_top = savestack(L, ci->top.p); /* idem for 'ci->top' */ in luaD_hook()
345 if (isLua(ci) && L->top.p < ci->top.p) in luaD_hook()
346 L->top.p = ci->top.p; /* protect entire activation register */ in luaD_hook()
348 if (ci->top.p < L->top.p + LUA_MINSTACK) in luaD_hook()
349 ci->top.p = L->top.p + LUA_MINSTACK; in luaD_hook()
357 ci->top.p = restorestack(L, ci_top); in luaD_hook()
358 L->top.p = restorestack(L, top); in luaD_hook()
389 StkId firstres = L->top.p - nres; /* index of first result */ in rethook()
419 for (p = L->top.p; p > func; p--) /* open space for metamethod */ in luaD_tryfuncTM()
421 L->top.p++; /* stack space pre-allocated by the caller */ in luaD_tryfuncTM()
438 L->top.p = res; in moveresults()
444 setobjs2s(L, res, L->top.p - nres); /* move it to proper place */ in moveresults()
445 L->top.p = res + 1; in moveresults()
468 firstresult = L->top.p - nres; /* index of first result */ in moveresults()
475 L->top.p = res + wanted; /* top points after the last result */ in moveresults()
503 int mask, StkId top) { in prepCallInfo() argument
508 ci->top.p = top; in prepCallInfo()
522 L->top.p + LUA_MINSTACK); in precallC()
523 lua_assert(ci->top.p <= L->stack_last.p); in precallC()
525 int narg = cast_int(L->top.p - func) - 1; in precallC()
563 ci->top.p = func + 1 + fsize; /* top for new function */ in luaD_pretailcall()
564 lua_assert(ci->top.p <= L->stack_last.p); in luaD_pretailcall()
567 L->top.p = func + narg1; /* set top */ in luaD_pretailcall()
600 int narg = cast_int(L->top.p - func) - 1; /* number of real arguments */ in luaD_precall()
607 setnilvalue(s2v(L->top.p++)); /* complete missing arguments */ in luaD_precall()
608 lua_assert(ci->top.p <= L->stack_last.p); in luaD_precall()
770 L->top.p -= narg; /* remove args from the stack */ in resume_error()
771 setsvalue2s(L, L->top.p, luaS_new(L, msg)); /* push error message */ in resume_error()
787 StkId firstArg = L->top.p - n; /* first argument */ in resume()
795 L->top.p = firstArg; /* discard arguments */ in resume()
838 else if (L->top.p - (L->ci->func.p + 1) == nargs) /* no function? */ in lua_resume()
856 luaD_seterrorobj(L, status, L->top.p); /* push error message */ in lua_resume()
857 L->ci->top.p = L->top.p; in lua_resume()
860 : cast_int(L->top.p - (L->ci->func.p + 1)); in lua_resume()
1015 status = luaD_pcall(L, f_parser, &p, savestack(L, L->top.p), L->errfunc); in luaD_protectedparser()