Lines Matching refs:top
83 setobj2s(L, L->top, f); /* push function */ in callTMres()
84 setobj2s(L, L->top+1, p1); /* 1st argument */ in callTMres()
85 setobj2s(L, L->top+2, p2); /* 2nd argument */ in callTMres()
87 L->top += 3; in callTMres()
88 luaD_call(L, L->top - 3, 1); in callTMres()
90 L->top--; in callTMres()
91 setobjs2s(L, res, L->top); in callTMres()
98 setobj2s(L, L->top, f); /* push function */ in callTM()
99 setobj2s(L, L->top+1, p1); /* 1st argument */ in callTM()
100 setobj2s(L, L->top+2, p2); /* 2nd argument */ in callTM()
101 setobj2s(L, L->top+3, p3); /* 3th argument */ in callTM()
103 L->top += 4; in callTM()
104 luaD_call(L, L->top - 4, 0); in callTM()
198 callTMres(L, L->top, tm1, p1, p2); in call_orderTM()
199 return !l_isfalse(L->top); in call_orderTM()
277 callTMres(L, L->top, tm, t1, t2); /* call TM */ in luaV_equalval()
278 return !l_isfalse(L->top); in luaV_equalval()
284 StkId top = L->base + last + 1; in luaV_concat() local
286 if (!(ttisstring(top-2) || ttisnumber(top-2)) || !tostring(L, top-1)) { in luaV_concat()
287 if (!call_binTM(L, top-2, top-1, top-2, TM_CONCAT)) in luaV_concat()
288 luaG_concaterror(L, top-2, top-1); in luaV_concat()
289 } else if (tsvalue(top-1)->len == 0) /* second op is empty? */ in luaV_concat()
290 (void)tostring(L, top - 2); /* result is first op (as string) */ in luaV_concat()
293 size_t tl = tsvalue(top-1)->len; in luaV_concat()
297 for (n = 1; n < total && tostring(L, top-n-1); n++) { in luaV_concat()
298 size_t l = tsvalue(top-n-1)->len; in luaV_concat()
305 size_t l = tsvalue(top-i)->len; in luaV_concat()
306 memcpy(buffer+tl, svalue(top-i), l); in luaV_concat()
309 setsvalue2s(L, top-n, luaS_newlstr(L, buffer, tl)); in luaV_concat()
404 lua_assert(base <= L->top && L->top <= L->stack + L->stacksize); in luaV_execute()
405 lua_assert(L->top == L->ci->top || luaG_checkopenop(i)); in luaV_execute()
589 if (b != 0) L->top = ra+b; /* else previous instruction set top */ in luaV_execute()
598 if (nresults >= 0) L->top = L->ci->top; in luaV_execute()
609 if (b != 0) L->top = ra+b; /* else previous instruction set top */ in luaV_execute()
621 for (aux = 0; pfunc+aux < L->top; aux++) /* move frame down */ in luaV_execute()
623 ci->top = L->top = func+aux; /* correct top */ in luaV_execute()
624 lua_assert(L->top == L->base + clvalue(func)->l.p->maxstacksize); in luaV_execute()
641 if (b != 0) L->top = ra+b-1; in luaV_execute()
648 if (b) L->top = L->ci->top; in luaV_execute()
686 L->top = cb+3; /* func. + 2 args (state and index) */ in luaV_execute()
688 L->top = L->ci->top; in luaV_execute()
703 n = cast_int(L->top - ra) - 1; in luaV_execute()
704 L->top = L->ci->top; in luaV_execute()
752 L->top = ra + n; in luaV_execute()