Am Donnerstag, 27. Juli 2006 19:44 schrieb Matt Diephouse:
>    .sub __get_string :method
>      $P0 = new .Exception
>      throw $P0
>    .end
>
> Running this gives:
>
>    caught
>    No exception to pop.

PIR code running on behalf of a vtable (or MMD) function is implemented by 
entering a secondary runloop (see src/pmc/delegate.pmc). The C code and the 
extra runloop is acting as a Continuation barrier. There are also some notes 
about that in dan's blog.

I've experimented some time ago to get at least exceptions working by 
rewinding runloops also, but have failed so far.

There's no way to get full Continuations working around such C code barriers, 
except by *not* entering secondary runloops at all for these cases[1]. This 
could be achieved by (optionally) returning a new PC for all vtable/MMD 
functions that is, by changing the internal (C) calling conventions of all 
the PMC code.

leo

[1] we can't avoid that for e.g. custom sort functions, but these are special 
enough that we could restrict these.

Reply via email to