Leopold Toetsch wrote: > I did check in a fix (or part of it) for restarting JIT.
Full restart for JIT/i386 is in CVS now. This implied some changes: - interpreter has now a jit_info * - build_asm had a jit_info on the stack, this is currently static, but will be allocated soon. - architectures have to implement Parrot_jit_restart (currently a dummy is provided, which will of course break t/op/interp_2 and emit warnings about missing return value) Some notes WRT implementation in i386: The first code in JIT is emitted by Parrot_jit_begin, the last 5 bytes of this code are 5 nop's now. When JIT is called again with a pc != code_start, i.e. for restart at pc, then a jump instruction to the native offset to this pc is patched into the JIT code. Other architectures could probably do something similar. The only tricky part is to calculate the jump offset, because offsets are already converted to absolute ptrs into the JIT code when restart is called. leo