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
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 thing)
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 I
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
subclass b, a, B
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
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,
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
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
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_subclass at