Thanks to Jeff, who pointed at that, Parrot's JIT system now explicitely supports JITed functions that call into Parrot, like e.g. most string functions do.

Here are the steps to use this functionality:

1) Arrange mappable registers like this:

   char <type>val_map[] = { non-volatiles, volatiles }:

2) define PRESERVED_<uc_type>_REGS as the count of non-volatiles

3) denote a function call in core.jit as

   CALL_FUNCTION(jit_info, the_function);

NB: the only effect of this statement is that the extcall flag of that opcode is set to -1. It does not call the function or even try to setup function arguments. Function call is done by ...

4) define that macro on top of core.jit

jit/i386/core.jit is using this functionality now.

Have fun,
leo



Reply via email to