Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A less controvertial API addition

9 views
Skip to first unread message

Dan Sugalski

unread,
Oct 21, 2003, 11:08:57 AM10/21/03
to perl6-i...@perl.org
While we're fighting^Wdiscussing the freezing system, there's a simpler
thing we need to have added in. We need an API entry point that allows C
code to invoke a sub/method PMC. This needs to be done both for the
embedding API (we'll wrap it) where the embedding app will call in, but
also for things like vtable functions where the actual function is parrot
bytecode.

Calling straight into runops looks a little too simplistic, but this'd be
a good place to poke around and see what you can come up with.

Dan

Leopold Toetsch

unread,
Oct 21, 2003, 12:23:38 PM10/21/03
to Dan Sugalski, perl6-i...@perl.org
Dan Sugalski <d...@sidhe.org> wrote:
> While we're fighting^Wdiscussing the freezing system, there's a simpler
> thing we need to have added in. We need an API entry point that allows C
> code to invoke a sub/method PMC.

What about params? I already thought about that a bit, and when looking
at extent.c:Parrot_call(), it seems that this needs another thunk (the
reverse of NCI), that sets up needed registers depending on a function
signature.

> Dan

leo

Dan Sugalski

unread,
Oct 21, 2003, 12:38:01 PM10/21/03
to Leopold Toetsch, perl6-i...@perl.org

We probably need two API entries. One, a vararg version, that just takes a
bunch of PMC pointers (or some sort of (ick) parameter signature), and a
second that assumes you've set the registers up properly already.

Dan

Leopold Toetsch

unread,
Oct 23, 2003, 5:36:06 AM10/23/03
to Dan Sugalski, perl6-i...@perl.org
Dan Sugalski <d...@sidhe.org> wrote:

> We probably need two API entries. One, a vararg version, that just takes a
> bunch of PMC pointers (or some sort of (ick) parameter signature), and a
> second that assumes you've set the registers up properly already.

Done both now. The (ick) signature variant is Parrot_runops_fromc_args()
needs some testing though, and some clarifaction WRT return conventions.

It could also preserve registers if a flag is given or setup an
exception handler, but its for sure somewhat slower then the direct calls
in delegate.pmc.

> Dan

leo

0 new messages