On Mon, Aug 22, 2005 at 12:45:41PM -0600, Jim Cromie wrote:
> 
> So I should get a bit more specific;
> I thought Id try to define a few op-private flags on padsv, sassign, 
> aassign to indicate
> some manner of dog-ness / object-ness.
> 
> I dont have any strategy in mind, except to mark them in a way that 
> makes them
> easy to find with optimizer.pm.  Then all sorts of out-of-core hackery 
> can commence. >:-)

In that case, if you just need to be able to identify the class then
look at how fields.pm does it.  Grep for FIELDS in op.c and go up a bit.

Here is some code I've used before with optimizer:

char* lexical_type(int pad_offset) {
    SV* lexname;
    lexname = *av_fetch(PL_comppad_name, pad_offset, TRUE);
    if (!(SvFLAGS(lexname) & SVpad_TYPED))
        return NULL;
    return HvNAME(SvSTASH(lexname));
}

HTH,

-- 
Rick Delaney
[EMAIL PROTECTED]

Reply via email to