On Wed, May 04, 2005 at 05:26:25PM +0100, Nicholas Clark wrote: > On Mon, May 02, 2005 at 08:58:43AM +0200, Leopold Toetsch wrote: > > Nicholas Clark <[EMAIL PROTECTED]> wrote: > > > Parrot gives each PMC class 8 private flag bits. I was wondering how to > > > use > > > these most efficiently for ponie. My thoughts so far are > > > > > 1 bit for SVf_IOK > > > 1 bit for SVf_NOK > > > 1 bit for SVf_POK > > > 1 bit for SVf_ROK > > > > I'd not mess around with (or introduce) flag bits. The more that this > > would only cover perl5 PMCs. Presuming that the Perl5 PMCs are subtypes > > Yes, this is the bit I'd not fully thought through. At some point when > ponie gets mature the innards are going to be presented with SVs that are > actually PMCs which aren't Perl 5 types.
How about a vtable method that returns an integer of some common flags that are meaningful to both p5 and parrot? then pp_pow() would just need to call it once at the start, then do various checks on the returned value? So pseduo-code like if (pmc->vtable->is_IOK()) ... else if (pmc->vtable->is_NOK()) ... becomes status = pmc->vtable->status(); if (status & IOK) ... else if (status & NOK) ... #include <std disclaimer about me knowing almost zilch about parrot> Dave -- My get-up-and-go just got up and went.