• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/

Lines Matching refs:top

87     ci->func = L->top - 1;  /* protect stack below results */
96 setobj2s(L, L->top++, f); /* push function */
97 setobj2s(L, L->top++, p1); /* 1st argument */
98 setobj2s(L, L->top++, p2); /* 2nd argument */
100 setobj2s(L, L->top++, p3); /* 3rd argument */
102 luaD_call(L, L->top - (4 - hasres), hasres, isLua(L->ci));
105 setobjs2s(L, p3, --L->top);
202 if (!call_binTM(L, p1, p2, L->top, event))
205 return !l_isfalse(L->top);
288 callTM(L, tm, t1, t2, L->top, 1); /* call TM */
289 return !l_isfalse(L->top);
296 StkId top = L->top;
298 if (!(ttisstring(top-2) || ttisnumber(top-2)) || !tostring(L, top-1)) {
299 if (!call_binTM(L, top-2, top-1, top-2, TM_CONCAT))
300 luaG_concaterror(L, top-2, top-1);
302 else if (tsvalue(top-1)->len == 0) /* second operand is empty? */
303 (void)tostring(L, top - 2); /* result is first operand */
304 else if (ttisstring(top-2) && tsvalue(top-2)->len == 0) {
305 setobjs2s(L, top - 2, top - 1); /* result is second op. */
309 size_t tl = tsvalue(top-1)->len;
313 for (i = 1; i < total && tostring(L, top-i-1); i++) {
314 size_t l = tsvalue(top-i-1)->len;
323 size_t l = tsvalue(top-i)->len;
324 memcpy(buffer+tl, svalue(top-i), l * sizeof(char));
327 setsvalue2s(L, top-n, luaS_newlstr(L, buffer, tl));
330 L->top -= n-1; /* popped 'n' strings and pushed one */
492 setobjs2s(L, base + GETARG_A(inst), --L->top);
496 int res = !l_isfalse(L->top - 1);
497 L->top--;
509 StkId top = L->top - 1; /* top when 'call_binTM' was called */
511 int total = cast_int(top - 1 - (base + b)); /* yet to concatenate */
512 setobj2s(L, top - 2, top); /* put TM result in proper position */
514 L->top = top - 1; /* top is one after last element (at top-2) */
518 setobj2s(L, ci->u.l.base + GETARG_A(inst), L->top - 1);
519 L->top = ci->top; /* restore top */
524 L->top = ci->top; /* correct top */
529 L->top = ci->top; /* adjust results */
574 Protect( luaC_condGC(L,{L->top = (c); /* limit of live values */ \
576 L->top = ci->top;}) /* restore top */ \
615 lua_assert(base <= L->top && L->top < L->stack + L->stacksize);
720 L->top = base + c + 1; /* mark the end of concat operands */
726 L->top = ci->top; /* restore top */
775 if (b != 0) L->top = ra+b; /* else previous instruction set top */
777 if (nresults >= 0) L->top = ci->top; /* adjust results */
788 if (b != 0) L->top = ra+b; /* else previous instruction set top */
807 oci->top = L->top = ofunc + (L->top - nfunc); /* correct top */
811 lua_assert(L->top == oci->u.l.base + getproto(ofunc)->maxstacksize);
817 if (b != 0) L->top = ra+b-1;
824 if (b) L->top = ci->top;
859 L->top = cb + 3; /* func. + 2 args (state and index) */
861 L->top = ci->top;
879 if (n == 0) n = cast_int(L->top - ra) - 1;
894 L->top = ci->top; /* correct top (in case of previous open call) */
913 L->top = ra + n;