Leopold Toetsch wrote:

Sam Ruby wrote:

Leopold Toetsch wrote:

Sam Ruby wrote:

However, VTABLE_invoke on NCI methods is where the "real work" is done (including reading from and writing to registers), and a null dest is returned.

Ouch. Sorry, probably cut'n'paste code, relicts or whatever. "runops_*" isn't supposed to be called for NCI methods. It's for running PASM opcodes. A NCI methods wraps a C function to be callable by PASM. If we are calling a NCI function from C, we can run the code diretly too.


I'll fix that.

I have a number of cases (filter, map, reduce), where I am passed an arbirary sub and need to call it. I should not have to know how the sub is implemented.

Just invoke it.

So, what you are telling me is that I need to clone runops_args and fix it right. I'll do that.

Argh. I didn't tell you that. The interface to run an arbitrary piece of code is VTABLE_invoke. The runops_fromc* functions run *opcodes* from inside C.

Grrr. First you tell me:

C<runops> is a low-level function that awaits all properly setup.
Around that are more function that e.g. create a return continuation and
do argument or returnvalue passing. Just use one of these functions as
delegate.c does.

To which I respond:

I *am* using Parrot_run_meth_fromc_args, just like delegate.c does.

Now you tell me, "Just invoke it".

But I need to do more than that. I need to do what Parrot_run_meth_fromc_args is attempting to do (i.e., create a return continuation and do argument or returnvalue passing.), but correctly.

- Sam Ruby

Reply via email to