The new opcodes[1] should now be usable for plain function calls (no NCI
yet) and returns. Type conversions (auto-boxing) flattening and slurping
is implemented.
Please have a look at the tests in t/op/calling.t and give it a try.
There is sill no PIR support for it, but you can use a hand-crafted call
sequence for now. It's not really difficult as no argument bits have to
be specified, *except* flatten and slurpy, e.g.:
find_name $P10, "foo"
set_args "(0,0,0)", $I0, $P0, "xx"
get_results "(0)", $P5
invokecc $P10
...
.sub "foo"
.get_params "(0x8), $P0 # slurpy array
...
Feedback welcome,
leo
|