On Sat, Aug 03, 2002 at 01:42:06AM -0400, Melvin Smith wrote:
> Here is an attempt. I'm assuming the stack of pads is a singly-linked list
> of pads with children pointing to parents, and multiple children can refer
> to the same parent. If they are created on the fly, the creation of
> a Sub or Closure will simply hold a pointer to its parent, and pads will
> be garbage collected.

This should work.  I think you still need a "real" stack of pads.  The
opcode "new_pad" creates a new pad whose parent is the top of the
stack, and replace this parent by the new pad in the stack. The opcode
"invoke" push the subrouting pad onto the stack.  The opcode "ret" pop
the top of the stack.

-- Jerome

Reply via email to