Does the core need "everything it does"?
If there was another "Array-style pmc that does everything it does"
then could PerlArray be an 'empty subclass' of it?
If the answer the first question is yes, then couldn't you just
rename PerlArray to something without "Perl" in it?
Is the taxonomy of PMCs and what functionality they have, written out
somewhere? If not then that seems like the best place to start.
Tim.
p.s. Forgive me if these are dumb questions - I'm still only a distant
observer.
> PerlArray is going to be the hardest to pull out, as there is no other
> Array-style pmc that does everything it does. (or, at least, I can't
> find one. =-)
The replacement ought to be ResizablePMCArray. Missing methods like
C<shift> need implementators.
The PMCArray is doomed and deprecated, it's a wrapper around PerlArray
anyway.
I'll have a closer look at the patch later, probably after SVN switch.
leo
> Attached, find the first trivial chunk, which removes as much Perl*
> from IMCC internals and tests as possible without writing actually
> writing any new PMC code.
Applied the trivial part, i.e. all but the change to PMCArray.
> PerlArray is going to be the hardest to pull out, as there is no other
> Array-style pmc that does everything it does. (or, at least, I can't
> find one. =-)
The PerlArray in imcc/pcc.c should be an ResizablePMCArray. But as this
is lacking some vtable methods, it's not changed yet. This array is used
for overflow arguments and flattening and as such a critical part of
function calls.
Thanks,
leo