embedding w/ new calling conventions

0 views
Skip to first unread message

Jeff Horwitz

unread,
Jul 6, 2005, 10:45:46 PM7/6/05
to perl6-i...@perl.org
mod_parrot is running into a bit of trouble calling subs written in PIR
with the new calling conventions. some initial observations:

* using Parrot_call_sub_* seems to require a get_params opcode (or a
.param), else it dies with "no get_params in sub". this is true
even when called with a void signature. isn't PIR supposed to take care
of that for us? it works fine in a non-embedded environment.

* subs can't return anything through the API. a simple ".return (0)"
causes Parrot_call_sub_reti to bomb out with an assertion failure:

src/sub.c:444: parrot_pass_args: Assertion
`(((src_signature)->obj.flags) & PObj_is_PMC_FLAG)' failed.

this may all be premature, as leo's branch is still brand-spanking new,
and i'm probably missing something.

that said, leo, we discussed some API enhancements on #parrot the other
day -- if you were planning on implementing something that will fix this,
just say the word and i'll keep quiet. :)

-jeff

Leopold Toetsch

unread,
Jul 7, 2005, 5:48:25 AM7/7/05
to Jeff Horwitz, perl6-i...@perl.org
Jeff Horwitz wrote:
> mod_parrot is running into a bit of trouble calling subs written in PIR
> with the new calling conventions.

[ ... ]

> this may all be premature, as leo's branch is still brand-spanking new,

Yep, very premature. I'd be glad to get some test cases, though.

> -jeff

Thanks,
leo

Reply all
Reply to author
Forward
0 new messages