[Dan Sugalski]
> Yup. Dispatch will look like:
> 
>     result = pmc1->vtable[ADD + pmc2->vtable[TYPE](pmc2, NUM)](pmc1, pmc2);
> 

Is that the way the add opcode for PMC is defined I imagine.
And in this form it cost you always two calls.

My understanding is that, for perl, PMCs
would be for example of the generic type scalar and then have
some concrete subtype (float or integer) and basically 
float and integer will share the scalar vtable. 
PMC at least for perl seem to be cells holding a value and a vtable
and the value can change through assignment and the vtable is 
a bit more stable. Not object carrying a very concrete type.
Is that right?

With object carrying a concrete type:

     result = pmc1->vtable[ADD + pmc2->vtable[FAST_TYPE]](pmc1, pmc2)

would possibly work but would not work for perl.

I don't see how this model can accomadate the semantics of
multiple languages ... at least not all at the same time and without
tweaking. But was it designed with that in mind?

Samuele.


Reply via email to