lua-users home
lua-l archive

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


Steven Johnson wrote:
> Sure, I'll see what I can do. This is embedded in a pretty big program and
> I think I've got meetings and such this week, so it might be a few days
> getting around to it.

The beta phase will take quite a bit longer than that. Take your
time. :-)

> I tried a run with a jit.off() call at the beginning and got similar results.

Ah, ok. Looks like some problem with the Lua/C API calls then.
Strange enough, but all of the key functions involved (module(),
luaL_register, luaL_findtable etc.) are the few remaining ones
that are still identical to the Lua codebase.

> It does not seem particularly fond of looping over package.loaders (as evidenced
> by the abrupt end of the dump once package.loaded closes), and this is true
> even when I dump only that table. On the other hand, I can iterate it
> without trouble
> in the command line, so maybe I've stepped on something.

Umm, have you checked your usage of lua_next() is correct? In
particular the stack adjustment during and after the traversal.

> I applied the patch beforehand. I do use negative indices, and worse still
> pseudo-indices (mea maxima culpa). I have since gotten rid of the latter,
> so far as a quick search revealed, though I'll have to give it a more thorough
> check when I've had some rest.

I'll probably have to support all kinds of indexes for the luaL_*
functions. It's more widespread than I had thought. Compatibility
with the quirks of the Lua implementation seems more important
here than following the specification.

--Mike