lua-users home
lua-l archive

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

Take a look at cframe_errfunc in lj_frame.h.

As far as I understand errfunc (converted to a "relative position" by
savestack) just keeps lying on stack where it was passed to
lj_vm_pcall (lj_api.c:880). So it can be later retrieved during stack
walk just as a 4th frame argument.

If you are interested about other cases it seems relevant to look at
finderrfunc (lj_err.c:489).


On Mon, Nov 2, 2009 at 5:30 PM, tankxx <> wrote:
> LUA_API int lua_pcall(lua_State *L, int nargs, int nresults, int errfunc);
> May Mike Pall explain where errfunc is stored in frame? I cannot
> figure out it when digging into source code of LJ2.