Parrot Extension API

2002-06-01 Thread Melvin Smith
I'm working on an experimental extension API, which is going well, but I'm pondering how the GC should cooperate with native calls. Currently I have some code like: # t.pasm loadlib P0, "libpqt.so" print "Loaded\n" callnative P1, P0, "PQt_init" end /* libpqt.c */ int PQt_init(Interp * interp) {

Re: Parrot Extension API

2002-06-01 Thread Melvin Smith
At 02:17 PM 6/1/2002 -0400, Melvin Smith wrote: ># t.pasm >loadlib P0, "libpqt.so" >print "Loaded\n" >callnative P1, P0, "PQt_init" >end The correct code is actually: loadlib P0, "libpqt.so" print "Loaded\n" # Save an argument for native method save "Testing..." # callnative calls a native metho

Re: Parrot Extension API

2002-06-01 Thread Melvin Smith
>Now there are a dozen ways to handle this. Using flags, keeping args on the >stack until return, yada yada yada... One option is we don't pass args to native on the normal stack, rather create a scratchpad Array PMC and pass it instead, so the routine can access it randomly. However, I'm unsure

Re: Parrot Extension API

2002-06-01 Thread Dan Sugalski
At 2:17 PM -0400 6/1/02, Melvin Smith wrote: >Now there are a dozen ways to handle this. Using flags, keeping args on the >stack until return, yada yada yada... > >I'd like to hear suggestions, or maybe reference to past discussions I might >have missed on how we shall handle this. Actually I want

Re: Parrot Extension API

2002-06-01 Thread Melvin Smith
At 02:50 PM 6/1/2002 -0400, Dan Sugalski wrote: >At 2:17 PM -0400 6/1/02, Melvin Smith wrote: >>Now there are a dozen ways to handle this. Using flags, keeping args on the >>stack until return, yada yada yada... >>Since extensions are supposed to be isolated from the interpreter >>internals, I'm