lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 23 May 2017 at 17:08, Daurnimator <quae@daurnimator.com> wrote:
> Looking through the lua source, I noticed in ldo.c:
>
> setobjs2s(L, g->mainthread->top++, L->top - 1);  /* copy error obj. */
>
> As far as I can see from comments in lobject.h, setobjs2s is meant to
> only be used when copying to the same stack.

After noticing that I did a bit of an audit.
In lvm.c these could be setobjs2s:
      setobj2s(L, top - 2, top);  /* put TM result in proper position */
      setobj2s(L, ci->u.l.base + GETARG_A(inst), L->top - 1);