lua-users home
lua-l archive

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


Mike Pall wrote:
> The C stack frames created by the machine code from LuaJIT 1.x
> actually mirror the frames in the Lua stack. But there may be some
> intervening frames from C functions which cannot be reconstructed
> easily. And persisting only the C stack of an arbitrary C program
> is intractable. The stack may contain pointers to heap-allocated
> objects which can end up at different addresses for different runs.
>   
I had forgotten about the native stacks being interspersed in their.
Quite correctly, this would stuff things up.
> Yes, LuaJIT 2.x doesn't switch between different C stacks for
> coroutines anymore. A suspended coroutine could be serialized with
> some effort. But the internal data formats are not compatible with
> standard Lua, so you won't be able to use Pluto at all. I probably
> need to add a native serialization module at a later time ...
>   
Is "2008" still a viable target for releasing LuaJIT 2.x? Not after a
hard date, of course, just trying to ascertain an approximate time-frame
for being able to use this. Basically, I am looking for a fast
green-thread solution that can be saved to disk for resuming later. Lua
has almost everything it needs for this with the exception that the JIT
compilation prevents the serialization. If LuaJIT 2.x can do this in the
next, say, three to six months - it would be the solution I am looking for.

Thanks for the prompt feedback so far, Mike. Much appreciated :)

--Ben