Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 10:28 AM +0100 11/22/04, Leopold Toetsch wrote:

> Maybe we should name it invoke_return.

Ok. If someone grep's through the tree and just changes all, it's done.
$ find . -type f | xargs grep -w returncc

> We'd talked at one point about swapping interpreter structures as
> part of sub invocation, though there wasn't any resolution to what
> the right way to do that was. It got tabled as part of the flareup.

I've tried that scheme and tossed it due to performance reasons.
Creating / copying whole interpreter structures is just more expensive
then what we got now. It wouldn't really help for creating tracebacks
enyway.

> Right now, I'm fine mandating that a non-invokable continuation is
> passed as the traceback object.

Not all languages need a traceback object. It's a Python feature. But
the non-invokable continuation sounds good, albeit it smells like
"context preserving overhead", as this traceback object can extract info
about the call frames, so they have to persist.

IMHO the throw as opcode scheme with all these arguments isn't flexible
enough to cover all HLL semnatics plus user thrawables.

What about:

  $P0 = getclass "Exception"
  e = $P0."new_extended"("KeyError")
  # or
  e = $P0."new_extended"("Borked", "Perl6", .Severe, whatever, ...)
  ...
  throw e

Actually this isn't a method call, it's the new_extended opcode with a
variable amount of arguments, passed in according to pdd03.

leo

Reply via email to