On Thu, 2002-04-25 at 18:14, Dan Sugalski wrote: > Okay, fair enough. Subs in general will have the following potential > information: > > *) A pointer to a template lexical scratchpad > *) A pointer to a *real* scratchpad (for co-routines and continuations) > *) A pointer to a parent lexical scratchpad (for continuations) > *) A pointer to the bytecode starting the sub > *) A pointer to the bytecode we should actually start at (for co-routines) > *) A pointer to a set of stacks (for co-routines and continuations) > *) A pointer to machine-level code (if we've been JITted or are an XSub) > *) A pointer to the current lexical state of the sub (opcode library, > amongst other things) (for co-routines, and potentially all the subs) > *) A pointer to the currently valid global symbol table tree > > Given how much is there, I think everyone's right that the subs > themselves should deal with this, which is pretty much what I've been > thinking we'd do. > > Calling into a sub will be done with either a call, callcc, or > tailcall. (Noting a normal call, a call with current continuation, or > a tail call so we don't save anything) The first two save the current > state for returning. Cleaning up the cruft that's accumulated since > the beginning of the current sub is the responsibility of other code.
I'll take this opportunity to repoint to a thread we had last September in re sub and method prototyping. The thread starts here: http:[EMAIL PROTECTED]/msg08182.html -- Bryan C. Warnock bwarnock@(gtemail.net|capita.com)