object PMC layout (was: subclassing bug)

2004-03-08 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > Nope, we don't need it. We can go one less level of indirection than > List, too, since we don't need the info it provides either, as the > entries are guaranteed to be PMCs. We can hang a bare PMC buffer > (well, OK, PArray, but they should be the same th

Re: subclassing bug

2004-03-08 Thread Dan Sugalski
At 12:03 PM -0500 3/7/04, Simon Glover wrote: Which leads me to ask a question that I've been pondering for a while -- do we actually need to use a fullblown Array PMC to hold the object meta-information and attributes? Couldn't we save a level of indirection (and one PMC header per object) by

Re: subclassing bug

2004-03-07 Thread Simon Glover
On Thu, 4 Mar 2004, Dan Sugalski wrote: > At 10:20 PM +0100 3/2/04, Jens Rieks wrote: > >The following code results in a > >clone() not implemented in class 'ParrotClass' > >error: > > > >.sub _main > > .local pmc a > > .local pmc b > > .local pmc c > > > > newclass a, "A" > >

Re: subclassing bug

2004-03-07 Thread Dan Sugalski
At 10:20 PM +0100 3/2/04, Jens Rieks wrote: The following code results in a clone() not implemented in class 'ParrotClass' error: .sub _main .local pmc a .local pmc b .local pmc c newclass a, "A" subclass b, a, "B" subclass c, b, "C" end .end Steve was right -- the clone

Re: subclassing bug

2004-03-03 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > Ah, I was thinking it was a single-level clone of data--basically a > shallow copy. I'll go fix. I still don't know, how deep vtable->clone should really go. Currently its of course still borken: it clones recursive-deeply and fails on self-referentials s

Re: subclassing bug

2004-03-03 Thread Dan Sugalski
At 7:37 PM -0500 3/2/04, Simon Glover wrote: I think I've figured out what's happening here. Stepping through the code with gdb shows that the first subclassing works fine, but the second blows up in Parrot_single_subclass at line 233: temp_pmc = VTABLE_clone(interpreter,

Re: subclassing bug

2004-03-03 Thread Leopold Toetsch
Jens Rieks <[EMAIL PROTECTED]> wrote: > The following code results in a > clone() not implemented in class 'ParrotClass' Can cou try to add this to parrotclass.pmc: PMC* clone() { return SELF; } > jens leo

Re: subclassing bug

2004-03-02 Thread Simon Glover
A PASM version of the test case is: newclass P16, "A" subclass P16, P16, "B" subclass P16, P16, "C" end I think I've figured out what's happening here. Stepping through the code with gdb shows that the first subclassing works fine, but the second blows up in Parrot_single_subcla

subclassing bug

2004-03-02 Thread Jens Rieks
The following code results in a clone() not implemented in class 'ParrotClass' error: .sub _main .local pmc a .local pmc b .local pmc c newclass a, "A" subclass b, a, "B" subclass c, b, "C" end .end jens