Hi,

On Tuesday 09 March 2004 21:17, Leopold Toetsch wrote:
> Jens Rieks <[EMAIL PROTECTED]> wrote:
> > The attached file has some helper functions to make object usage
> > easier.  It is used by the new object orientated Data::Dumper
> > implementation as well as my EBNF parser generator.  I submit it as a
> > standalone library to reduce code duplication. It might also be useful
> > for other developers too.  Please refer to the POD of this library for
> > more information about it.
>
> Good. I've seen these functions :) They are fine, except for one:
> >=item (retvals) = __call( obj, methodname, ... )
> >
> >     set S0, S5
> >     set P2, P5
>
> [ snipped  a lot more reg moves ]
>
> This isn't really looking good.
>
> what about:
>
>    (retvals) = obj.methodname(...)
Yes that would be the best solution. I had a cursory look at the IMCC sources, 
but found no obvious way to implement it.

> Melvin would that be ok? It *should* be a simple extension of the
> current function call syntax. We need to emit above two lines
> additionally and C<callmethcc> instead of C<invokecc>, that's all,
> AFAIK.

Is there a way to get the parent (one should be enough for now) of a 
ParrotClass? I attached the parent ParrotClass as a property in __new_class, 
but that does not work anymore because its now possible to use the function 
with the name of the class to subclass from.
Is it possible to get a ParrotClass if the name is known, without having to 
instantiate an object of that type and using the getclass op on it?
If I know how to do that I can add a "__multicall" function that calls the 
specified method on all base classes, starting with the root baseclass. It is 
usefull for constructor calling, to make sure that all base classes are 
initialized in the proper order.

> leo
jens

Reply via email to