On Mon, Jan 12, 2004 at 10:05:51AM +0100, Leopold Toetsch wrote:
> Stéphane Payrard <[EMAIL PROTECTED]> wrote:
> > Abstract pmcs should appear in core_pmcs.h and pmctypes.pasm
> > because one needs them as base pmcs so as to declare
> > pseudo-registers. This is a prerequisite to add pmc type checking
> > to imcc.
> 
> I don't think that we need the type names of abstract PMCs.

If one wants to add typechecking to imcc, it is necessary to have
abstract/noinit types.

Example:

   .sym scalar var
   new var, .Perlint  # the instance is a substype of C<scalar>

> 
> > Unlike other pmcs, abstract pmcs have names that are all lower
> > case, is that deliberate?
> 
> Yes.
> 
> > What is the difference between declaring a pmc as C<noinit> or as
> > C<abstract>? Currently when one is set, the other is also set.
> 
> C<abstract> is unimplemented.
> 
> > For sake of some kind of introspection,
> > it may useful to generate a vtable in the C file generated for an
> > abstract class albeit with init methods that trigger exception.
> 
> The C<isa> of derived type shows abstract base types too. That's
> probably enough. For now, I'd rather not have vtables for these (each
> unused piece of memory is kind of an overhead).

There is not so many abstract pmc types and one could manage to
use shorter vtables for these types with init methods that trigger
exceptions. Other methods entries are not necessary (except for some
introspection purpose) because they will never be called.


> But it could be, that we finally have real C<abstract> base types, that
> implement some useful functionality on behalf of derived child
> classes.

My understanding is that we already have that. C<noinit> types
define methods used by derived types. So I still fail to
understand the difference between C<noinit> and C<abstract>

> leo

--
 stef

Reply via email to