chromatic (via RT) wrote:

Several tests fail with the CGP runcore (parrot -C) when multidispatch re-enters bytecode -- in specific, anything that calls into src/pic.c from Parrot_pcc_invoke_sub_from_sig_object causes failures.

The problem appears to be that CGP's PIC tries to poke into the bytecode directly to find get_params and similar opcodes, while parameter-passing information is in a context after Parrot_pcc_invoke_sub_from_sig_object.

One workaround is to enforce the use of the normal runcore only for calls back into Parrot from Parrot_pcc_invoke_sub_from_sig_object, but that's just a workaround. A better solution is to fix the PIC code to look in the appropriate place in the context for return values. That seems like a good task for the calling conventions branch.

I've been debating whether src/pic.c should be removed entirely. It's a swodge of code that only gives a tiny speedup for 4 opcodes: 'infix', 'get_params', 'set_args', and 'set_returns'. And the 'infix' opcode has been deprecated and will be removed in the calling conventions branch (it was a nasty hack for the old MMD system). And it's not even really the right speedup for 'get_params', 'set_args', and 'set_returns'.

There are also a pile of old, nasty MMD functions that should be deleted and are only called from src/pic.c.

Allison

Reply via email to