On Thu, Feb 14, 2002 at 02:10:20PM +0000, Dave Mitchell wrote:
> 2. If so, how do we distinguish between two PMCs, both of whose
> vtable pointers currently point to the 'Dog' vtable, but one of whom has
> been delared as type Dog and so should never have it's vatble pointer
> updated, and the other which started off as a 'plain' PMC, has temporariky
> becomes a Dog by beeing assigned to from a Dog value, but will change
> again the next time we assign something to it?

I may be way off here, but why does Parrot need to know its a Dog ? Thats
a perl level thing. To Parrot the PMC is an object, Dog would be a property
of the value, not the variable.

At the Parrot level the difference between

  my Dog $spot = new Dog;
  my $scalar = new Dog;

is that the prior would have an extra vtable entry to handle assignment.
That vtable method only needs to check that what is being assigned is
a PMC of the right type.

Graham.

Reply via email to