Re: Subs for parrot

2002-06-10 Thread Dan Sugalski
At 11:31 AM +0200 6/10/02, Jerome Vouillon wrote: >On Sun, Jun 09, 2002 at 05:18:31PM -0400, Dan Sugalski wrote: >> Who says we're only using callcc to capture continuations? We can do >> it anywhere, so we potentially need the registers stored so we can >> properly restore state when we're inv

Re: Subs for parrot

2002-06-10 Thread Jerome Vouillon
On Sun, Jun 09, 2002 at 05:18:31PM -0400, Dan Sugalski wrote: > Who says we're only using callcc to capture continuations? We can do > it anywhere, so we potentially need the registers stored so we can > properly restore state when we're invoked. I don't understand what you mean. In scheme, ca

Re: Subs for parrot

2002-06-09 Thread Dan Sugalski
At 11:26 AM +0200 6/9/02, Jerome Vouillon wrote: >On Sat, Jun 08, 2002 at 02:34:19PM -0400, Dan Sugalski wrote: > > Indirect function calls will take maybe 50 cycles, so I'm not worried > > about their time. Compared to perl 5, that's fast. > >With a JIT compiler, this starts to be significant,

Re: Subs for parrot

2002-06-09 Thread Jerome Vouillon
On Sat, Jun 08, 2002 at 02:34:19PM -0400, Dan Sugalski wrote: > Indirect function calls will take maybe 50 cycles, so I'm not worried > about their time. Compared to perl 5, that's fast. With a JIT compiler, this starts to be significant, though. > >A continuation can be invoked just like any o

Re: Subs for parrot

2002-06-08 Thread Dan Sugalski
At 10:40 AM +0200 6/8/02, Jerome Vouillon wrote: >On Fri, Jun 07, 2002 at 01:50:27AM -0400, Dan Sugalski wrote: >> So, in total, we need: >> >> *) Original routine entry point >> *) Current routine entry point >> *) Native/bytecode flag >> *) Opcode table >> *) Global namespace chain >> *)

Re: Subs for parrot

2002-06-08 Thread Jerome Vouillon
On Fri, Jun 07, 2002 at 01:50:27AM -0400, Dan Sugalski wrote: > So, in total, we need: > > *) Original routine entry point > *) Current routine entry point > *) Native/bytecode flag > *) Opcode table > *) Global namespace chain > *) "default" lexical scope > *) All the register sets > *) All the

Re: Subs for parrot

2002-06-06 Thread Melvin Smith
At 01:50 AM 6/7/2002 -0400, Dan Sugalski wrote: >So, we're adding an invoke vtable method, and we'll have four sub PMC >types: ParrotSub, ParrotClosure, ParrotCoroutine, and >ParrotContinuation. We ought to be able to create them with limited >trouble, and it's OK if they've got evil knowledge of

Subs for parrot

2002-06-06 Thread Dan Sugalski
Here's a quick sketch of what I'm thinking we'll do for subs. No, it doesn't address stack stuff yet. That's next. There are four flavors of subs: 1) Normal subs 2) Closures (which most normal subs really are) 3) Coroutines 4) Continuations Additionally each of these subs may be either native