On Thu, Nov 14, 2002 at 05:55:21PM +0100, Leopold Toetsch wrote:

> But above is only needed, if there are callee saved registers around 
> which hold parrot register values not already saved. So currently not, 
> because there are no unsaved registers, when calling external code and 
> jitted OPs currently don't throw exceptions.

If the JIT allocates any parrot register contents to caller-save registers,
those registers must be saved to backing store-somewhere. On IA-32 the only
place those registers can be spilled is RAM, either on the stack or on the
heap. In this case, you basically have the scheme I described.

If the JIT allocates any parrot register contents to callee-save registers
(which we use strictly as such), and calls an external function that raises an
exception, you cannot restore the contents of those registers to Parrot
registers after the external function raises an exception because you do not
know where or how the compiler has saved the registers.

-- 
Jason

Reply via email to