[squeak-dev] The Inbox: Collections-JH.814.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Fri Jan 25 08:10:56 UTC 2019


Yes, we might want to reduce the amound of duplicate error strings in the entire image. This explicit way, however, is consistent with SequenceableCollection >> #with:do:.
Am 25.01.2019 01:03:49 schrieb Chris Muller <asqueaker at gmail.com>:
In the spirit of #emptyCheck, how about factoring that line into
#sizeCheck or something..?

On Thu, Jan 24, 2019 at 3:32 AM wrote:
>
> A new version of Collections was added to project The Inbox:
> http://source.squeak.org/inbox/Collections-JH.814.mcz
>
> ==================== Summary ====================
>
> Name: Collections-JH.814
> Author: JH
> Time: 24 January 2019, 10:32:33.157023 am
> UUID: 2981cec1-a155-7840-bbff-827a8f3387bb
> Ancestors: Collections-eem.806
>
> Add check to FloatArray primitive fallback code to ensure that receiver and argument have the same size (argument was previously allowed to be larger than receiver, which does not make sense mathematically).
>
> =============== Diff against Collections-eem.806 ===============
>
> Item was changed:
> ----- Method: FloatArray>>primAddArray: (in category 'primitives-plugin') -----
> primAddArray: floatArray
>
>
> + self size = floatArray size ifFalse:[^self error:'Must be equal size'].
> 1 to: self size do:[:i| self at: i put: (self at: i) + (floatArray at: i)].!
>
> Item was changed:
> ----- Method: FloatArray>>primDivArray: (in category 'primitives-plugin') -----
> primDivArray: floatArray
>
>
> + self size = floatArray size ifFalse:[^self error:'Must be equal size'].
> 1 to: self size do:[:i| self at: i put: (self at: i) / (floatArray at: i)].!
>
> Item was changed:
> ----- Method: FloatArray>>primMulArray: (in category 'primitives-plugin') -----
> primMulArray: floatArray
>
>
> + self size = floatArray size ifFalse:[^self error:'Must be equal size'].
> 1 to: self size do:[:i| self at: i put: (self at: i) * (floatArray at: i)].!
>
> Item was changed:
> ----- Method: FloatArray>>primSubArray: (in category 'primitives-plugin') -----
> primSubArray: floatArray
>
>
> + self size = floatArray size ifFalse:[^self error:'Must be equal size'].
> 1 to: self size do:[:i| self at: i put: (self at: i) - (floatArray at: i)].!
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190125/733a92be/attachment.html>


More information about the Squeak-dev mailing list