logo       

Re: pmc_type: msg#00550

lang.perl.perl6.internals

Subject: Re: pmc_type

Stéphane Payrard <stef@xxxxxxxxxxx> wrote:

> A related but different issue is that abstract pmcs like (Scalar
> and PerlScalar) have no pmc_type. I understand that pmc_type are
> an offset in the table of pmc vtables and that we probably cannot
> have holes in that table. Nevertheless it would be nice for these
> abstract pmcs to have a pmc_type; say for base type pmc checking in
> imcc or some related tools.

Isn't really needed:

$ find t -name '*.t' | xargs grep -w isa
...
t/pmc/objects.t: isa I0, P1, "scalar"
...

Having a type enum for these abstract types would imply to install a
vtable, filled with methods that catch errors.

> I think one of the constraint is that the pmc type numbers must
> not overlap the values in PARROT_DATA_TYPES.

If you mean the struct _data_types data_types[] list of "native" types,
yes - they don't overlap, these are all negative numbers.

> --
> stef

leo



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise