Re: stop & continue lua code
[
Date Prev][Date Next][
Thread Prev][Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: stop & continue lua code
- From: Peter Cawley <lua@...>
- Date: 2010年6月30日 23:13:24 +0100
On Wed, Jun 30, 2010 at 11:07 PM, Ben R. <benr.mail@gmail.com> wrote:
> Hello all,
> Given any Lua program, I would like to build something that provides the
> next features:
> - "execute X steps" - runs the program for exactly X bytecode instructions,
> stops the execution and writes some output file.
> - "continue Y steps" - given some output file of the above feature,
> continues execution from step X till step Y (and outputs a new file if the
> program didn't end).
> Obviously, I'm ready to play with the VM code if needed..
> Currently I'm still thinking whether Lua is indeed suitable for that (it
> seems so), and I would be happy to hear any opinions or suggestions.
> Thanks!
> Ben
My initial thoughts would be:
1) debug.sethook to execute for X steps
2) Pluto (http://lua-users.org/wiki/PlutoLibrary) for writing Lua
state to file and then loading it back