• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/contrib/lua/src/

Lines Matching refs:top

448   luaT_callTM(L, tm, t1, t2, L->top, 1);  /* call TM */
449 return !l_isfalse(L->top);
459 /* copy strings in stack from top - n up to top - 1 to buffer */
460 static void copy2buff (StkId top, int n, char *buff) {
463 size_t l = vslen(top - n); /* length of string being copied */
464 memcpy(buff + tl, svalue(top - n), l * sizeof(char));
472 ** from 'L->top - total' up to 'L->top - 1'.
477 StkId top = L->top;
479 if (!(ttisstring(top-2) || cvt2str(top-2)) || !tostring(L, top-1))
480 luaT_trybinTM(L, top-2, top-1, top-2, TM_CONCAT);
481 else if (isemptystr(top - 1)) /* second operand is empty? */
482 cast_void(tostring(L, top - 2)); /* result is first operand */
483 else if (isemptystr(top - 2)) { /* first operand is an empty string? */
484 setobjs2s(L, top - 2, top - 1); /* result is second op. */
488 size_t tl = vslen(top - 1);
491 for (n = 1; n < total && tostring(L, top - n - 1); n++) {
492 size_t l = vslen(top - n - 1);
499 copy2buff(top, n, buff); /* copy strings to buffer */
504 copy2buff(top, n, getstr(ts));
506 setsvalue2s(L, top - n, ts); /* create result */
509 L->top -= n-1; /* popped 'n' strings and pushed one */
667 setobjs2s(L, base + GETARG_A(inst), --L->top);
671 int res = !l_isfalse(L->top - 1);
672 L->top--;
684 StkId top = L->top - 1; /* top when 'luaT_trybinTM' was called */
686 int total = cast_int(top - 1 - (base + b)); /* yet to concatenate */
687 setobj2s(L, top - 2, top); /* put TM result in proper position */
689 L->top = top - 1; /* top is one after last element (at top-2) */
693 setobj2s(L, ci->u.l.base + GETARG_A(inst), L->top - 1);
694 L->top = ci->top; /* restore top */
699 L->top = ci->top; /* correct top */
704 L->top = ci->top; /* adjust results */
750 { luaC_condGC(L, L->top = (c), /* limit of live values */ \
751 Protect(L->top = ci->top)); /* restore top */ \
762 lua_assert(base <= L->top && L->top < L->stack + L->stacksize); \
1071 L->top = base + c + 1; /* mark the end of concat operands */
1077 L->top = ci->top; /* restore top */
1133 if (b != 0) L->top = ra+b; /* else previous instruction set top */
1136 L->top = ci->top; /* adjust results */
1147 if (b != 0) L->top = ra+b; /* else previous instruction set top */
1167 oci->top = L->top = ofunc + (L->top - nfunc); /* correct top */
1171 lua_assert(L->top == oci->u.l.base + getproto(ofunc)->maxstacksize);
1179 b = luaD_poscall(L, ci, ra, (b != 0 ? b - 1 : cast_int(L->top - ra)));
1184 if (b) L->top = ci->top;
1247 L->top = cb + 3; /* func. + 2 args (state and index) */
1249 L->top = ci->top;
1268 if (n == 0) n = cast_int(L->top - ra) - 1;
1282 L->top = ci->top; /* correct top (in case of previous open call) */
1305 L->top = ra + n;