Alexander Nikitin a écrit :
Um, it's not-so-useful this way (I want to transfer entire programs,
i.e. code with the state, like a serialized frozen virtual machine,
ready to be resumed at any time). What is easier to write -
disassembler, offset fixer (or similar bytecode patcher), or JIT
plug-in that saves source code together with byte code into a code
object, to allow for serialization?

It would be possible to keep the original bytecode offset in JIT functions, so they can be serializable the same as Bytecode functions. That would require an extra word per-function, in order to differentiate between bytecode address and JIT one.

One other possibility would be to create a JIT dispatch table that would allow for instance to know the original bytecode offset by reading the integer at [addr-1].

After that, you would have to send original bytecode + serialized value, as you would do in bytecode mode.

Nicolas

--
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to