Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: #34394: [TODO] implement the splice vtable in *PMCArrays

0 views
Skip to first unread message

Leopold Toetsch

unread,
Sep 18, 2005, 4:52:08 PM9/18/05
to Nicholas Dronen, Internals List
[ cc'ed list ]

On Sep 18, 2005, at 17:52, Nicholas Dronen wrote:

>
> Hi, Leopold:
>
> I'm interested in contributing to Parrot development. I'm in grad
> school
> and working 25 hours/week, so I can only afford to give a few hours
> per month. Even so, I think the best thing for me to do is to pick a
> thing to do, and just do it. Does #34394 seem like a good place to
> start?

Great, thanks. All contributions are very welcome.

> Regards,
>
> Nick

leo

Jonathan Worthington

unread,
Sep 18, 2005, 6:48:08 PM9/18/05
to Nicholas Dronen, Internals List
Indeed, welcome Nick. :-)

Picking something that needs doing and doing it is a good way to get
involved - I started out by sending in patches to deal with Win32 related
issues. #34394 is probably a decent thing to start out with - it'll get you
familiar with PMCs and doesn't require knowledge of a massive amount of the
Parrot codebase to acomplish.

I guess if I could offer any advice, it'd be don't be afraid of asking
questions and also expect to have to look at the source to figure some stuff
out, because the docs aren't always as great or up to date as you might
hope. Noting where the docs seem wrong/missing/unclear, or if you can and
have the time sending in a patch to correct them, would be a big help.

Jonathan

Nicholas Dronen

unread,
Sep 19, 2005, 11:40:59 AM9/19/05
to Perl6 Internals
On Sun, Sep 18, 2005 at 11:48:08PM +0100, Jonathan Worthington wrote:
[ snip ]

> I guess if I could offer any advice, it'd be don't be afraid of asking
> questions and also expect to have to look at the source to figure some
> stuff out, because the docs aren't always as great or up to date as you
> might hope. Noting where the docs seem wrong/missing/unclear, or if you
> can and have the time sending in a patch to correct them, would be a big
> help.

Taking your advice to heart, I'll dive in with an initial question about
this particular bug. :-)

I don't know which particular files "*PMCArrays" refers to in #34394.
I assume that at least some of the C source files in classes/ that
use Parrot_default_splice instead of their own splice instead of
Parrot_*PMCArray_splice are the ones that need to be changed.

$ grep -l Parrot_default_splice *.c | grep array
fixedbooleanarray.c
fixedfloatarray.c
fixedintegerarray.c
fixedpmcarray.c
fixedstringarray.c
floatvalarray.c
resizablebooleanarray.c
resizablefloatarray.c
resizableintegerarray.c
resizablepmcarray.c
resizablestringarray.c
sarray.c
stringarray.c

I'll start with fixedpmcarray.c, but #34394 also mentions boolean arrays.
Any others?

Regards,

Nick

Jonathan Worthington

unread,
Sep 19, 2005, 12:20:06 PM9/19/05
to Nicholas Dronen, Perl6 Internals
The C files are not the things you want to be modifying, but rather the .pmc
files in the classes directory. The .c files are generated from the .pmc
files. So when you modify a .pmc file, then do a "make", a new .c file is
generated and then compiled, etc.

The ticket says:-

"The splice opcode has the functionality of the perl5 function, so that
should be rather straight to implement. See also classes/array.pmc:splice.

FixedPMCArray can have a splice too, if the array limit isn't hit."

So I guess this means implement splice in ResizablePMCArray.pmc and
FixedPMCArray.pmc first. Then later other arrays can be done, but I'm
guessing again from the ticket that they used a different allocation scheme
and that needs changing too. There's quite a bit to this task I think - so
I suggest have a go at the *pmcarray.pmc files first.

See also:-
http://www.parrotcode.org/docs/pmc.html
http://www.parrotcode.org/docs/pmc2c.html

Hope this helps - just yell if not. :-)

Jonathan

Matt Fowles

unread,
Sep 19, 2005, 2:18:11 PM9/19/05
to Jonathan Worthington, Nicholas Dronen, Perl6 Internals
Jonathan~

I updated the allocation schemes about a month ago. So they should
all use the same one (except boolean which uses bits (I think)).

Matt
--
"Computer Science is merely the post-Turing Decline of Formal Systems Theory."
-Stan Kelly-Bootle, The Devil's DP Dictionary

0 new messages