Re: Embedding and stack

2004-05-08 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > +void * > +Parrot_Embed_PMC_get_pointer(Parrot_Interp interp, Parrot_PMC pmc) { > +if(interp->lo_var_ptr) { > +return Parrot_PMC_get_pointer(interp, pmc); > +} else { > +void *result; /* Doubles up as an indicator of stack top. *

Re: Embedding and stack

2004-05-07 Thread Nicholas Clark
On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: > Okay, here's the rules for PMCs that live outside parrot, and calling > into parrot from the outside. > > 1) *ALL* PMCs which are created outside parrot must be registered > (unless they're otherwise anchored) > 2) No call into parr

Re: Embedding and stack

2004-05-04 Thread Leopold Toetsch
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> wrote: > Dan Sugalski wrote: >> 3) The embedding wrapper is responsible for setting and resetting the >> top of stack. > Proof-of-concept: Looks good. Thanks, applied. leo

Re: Embedding and stack

2004-05-03 Thread Dan Sugalski
At 9:33 PM +0100 5/3/04, Nicholas Clark wrote: On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: 3) The embedding wrapper is responsible for setting and resetting the top of stack. I don't think that this is quite right. The embedding wrapper needs to set (and reset) the top of stack

Re: Embedding and stack

2004-05-03 Thread Nicholas Clark
On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: > 3) The embedding wrapper is responsible for setting and resetting the > top of stack. I don't think that this is quite right. The embedding wrapper needs to set (and reset) the top of stack only if it's not set. Otherwise this scen

Re: Embedding and stack

2004-05-03 Thread Nicholas Clark
On Mon, May 03, 2004 at 04:36:38PM -0400, Dan Sugalski wrote: > At 9:33 PM +0100 5/3/04, Nicholas Clark wrote: > >On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: > > > >> 3) The embedding wrapper is responsible for setting and resetting the > >> top of stack. > > > >I don't think that

Re: Embedding and stack

2004-05-03 Thread Dan Sugalski
At 9:43 PM +0100 5/3/04, Nicholas Clark wrote: On Mon, May 03, 2004 at 04:36:38PM -0400, Dan Sugalski wrote: At 9:33 PM +0100 5/3/04, Nicholas Clark wrote: >On Mon, May 03, 2004 at 10:46:28AM -0400, Dan Sugalski wrote: > >> 3) The embedding wrapper is responsible for setting and resetting the

Re: Embedding and stack

2004-05-03 Thread Brent 'Dax' Royal-Gordon
Dan Sugalski wrote: 3) The embedding wrapper is responsible for setting and resetting the top of stack. Proof-of-concept: --- src/embed.c 2 May 2004 10:47:54 - 1.113 +++ src/embed.c 3 May 2004 19:08:23 - @@ -666,6 +666,17 @@ void Parrot_runcode(Interp *interpreter, int argc, char

Embedding and stack

2004-05-03 Thread Dan Sugalski
Okay, here's the rules for PMCs that live outside parrot, and calling into parrot from the outside. 1) *ALL* PMCs which are created outside parrot must be registered (unless they're otherwise anchored) 2) No call into parrot from the outside needs to pass in a stack top (though it may via a sep