Piers Cawley <[EMAIL PROTECTED]> wrote:

> I'm not sure you can optimize it to a jump opcode when you're tail
> calling another function can you? You could be tailcalling into a
> closure so you'll need to use invoke to do the right thing with the
> lexical stack etc.

Argh, yes. What about:

If the subroutine is constructed inside the sub, parrot sees the class
and can decide at compile time to either jump or invoke.

If the subroutine is passed in, a runtime check could be done:

  if sub.isa("Sub") goto do_jump
  invoke

leo

Reply via email to