Re: Dynamic Perl, Part 1 [IMCC]

1 view
Skip to first unread message

Tim Bunce

unread,
Apr 8, 2005, 8:04:19 AM4/8/05
to William Coleda, Perl 6 Internals, Leopold Toetsch
On Thu, Apr 07, 2005 at 11:35:46PM -0400, William Coleda wrote:
> There are two open tickets about removing the core's dependance on Perl*
> PMCs, and instead, making them dynamically loadable and using the language
> agnostic PMCs for internal use.
>
> Talking about this with Leo on IRC, he expressed an interest in getting
> these changes in chunks to make them a little more digestable.
>
> 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.
> 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. =-)

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.

Leopold Toetsch

unread,
Apr 8, 2005, 12:01:09 PM4/8/05
to William Coleda, perl6-i...@perl.org
William Coleda <wi...@coleda.com> wrote:

> 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

Leopold Toetsch

unread,
Apr 9, 2005, 4:01:04 AM4/9/05
to William Coleda, perl6-i...@perl.org
William Coleda <wi...@coleda.com> wrote:

> 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

Reply all
Reply to author
Forward
0 new messages