Piers Cawley <[EMAIL PROTECTED]> wrote:

> Remember how Leo wanted an example of how continuations were used?

Great example - I don't understand how it wotks though :) - but I
understand, why the PIR code might fail:

> .sub _choose

[ ... ]

>      store_lex 1, "cc", P1

You aren't allowed to do that. While P1 is the return continuation
passed into C<_choose> it's not (or may be not) in P1 during the whole
function body. That's not guranteed. It's guranteed that returning from
the sub will use this continuation, that's all.
You can't assume any fixed PASM register for some PIR item.

WRT RetContinuation vs Continuation - they are still not the same. I'll
try hard to keep the distinction that RetContinuations are only used
once (which your program seems not to do). Having that distinction would
give us more then 50% speed up in plain function (and method) calls.

You can turn off this distinction in src/objects.c:782 with

  #define DISBALE_RETC_RECYCLING 1

or pass to _choose a real Continuation PMC in P1.

(the program still fails, but now differently, I'll have a closer look
at it tomorrow)

leo

Reply via email to