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.
- Sam Ruby
leo