All~
This patch adds Resizable*Array pmcs as the counterparts to Fixed*Array
pmcs. It does so by inheriting from them, so the Fixed ones are changed
too.
This includes the patch from Nicholas Clark [perl #30241]
t/pmc/fixedfloatarray.t SEGV on x86 Linux.
Tests are included.
One important note. This is a really simple implementation. One might
want to do something like size doubling or something smart, but this
doesn't do that.
Matt
Applied, thanks.
--
Dan
--------------------------------------it's like this-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
> Applied, thanks.
- duplicates existing PMCs functionality:
IntList <-> ResizableIntegerArray
FloatvalArray <-> ResizableFloatArray
PerlArray <-> ResizablePMCArray
Array <-> FixedMCArray
- incomplete: push/pop/shift/unshift/splice/freeze/thaw
- It's broken (realloced mem isn't cleared always)
= It's 2 times slower for filling arrays with this loop:
i = 0
lp:
ar[i] = 1
inc i
if i < n goto lp
- clone is different (shallow vs deep) - whatever is right
leo
Yup. (Well, except for the PerlArray part) Part of this exercise is
to standardize things and toss the things we no longer need.
>- incomplete: push/pop/shift/unshift/splice/freeze/thaw
Then we need to start a todo list.
>- It's broken (realloced mem isn't cleared always)
So fix it, or file a bug report for someone else to fix.
>= It's 2 times slower for filling arrays with this loop:
>
> i = 0
>lp:
> ar[i] = 1
> inc i
> if i < n goto lp
Well, yeah, it's unoptimized. That can be fixed.
>- clone is different (shallow vs deep) - whatever is right
Which needs standardization.