[squeak-dev] The Trunk: Collections-ar.147.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: Collections-ar.147.mcz

commits-2
Andreas Raab uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ar.147.mcz

==================== Summary ====================

Name: Collections-ar.147
Author: ar
Time: 29 September 2009, 11:39:57 am
UUID: bef1189d-525b-c540-a331-e19062c1ecbf
Ancestors: Collections-ar.146, Collections-ul.136

Merging Collections-ul.136

- primitive 60 won't help with Array >> #at:ifAbsent: because it accepts only one parameter, so changed SequenceableCollection >> #at:ifAbsent: to get some improvement (assumes that indexes greater than the upper bound are more common than indexes smaller than the lower bound)

=============== Diff against Collections-ar.146 ===============

Item was changed:
  ----- Method: SequenceableCollection>>at:ifAbsent: (in category 'accessing') -----
  at: index ifAbsent: exceptionBlock
  "Answer the element at my position index. If I do not contain an element
  at index, answer the result of evaluating the argument, exceptionBlock."
 
+ (index <= self size  and: [ 1 <= index ]) ifTrue: [ ^self at: index ].
+ ^exceptionBlock value!
- (index between: 1 and: self size) ifTrue: [^ self at: index].
- ^ exceptionBlock value!