Jonathan~ On 9/19/05, Jonathan Worthington <[EMAIL PROTECTED]> wrote: > "Nicholas Dronen" <[EMAIL PROTECTED]> wrote: > > 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? > > > 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.
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