Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

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

瀏覽次數:0 次
跳到第一則未讀訊息

Leopold Toetsch

未讀,
2005年9月18日 下午4:52:082005/9/18
收件者: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

未讀,
2005年9月18日 下午6:48:082005/9/18
收件者: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

未讀,
2005年9月19日 上午11:40:592005/9/19
收件者: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

未讀,
2005年9月19日 中午12:20:062005/9/19
收件者: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

未讀,
2005年9月19日 下午2:18:112005/9/19
收件者: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 則新訊息