Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.239.mcz==================== Summary ====================
Name: Collections-nice.239
Author: nice
Time: 4 December 2009, 3:57:30 am
UUID: d67661a8-1206-da45-90f5-3c5081799230
Ancestors: Collections-ul.238
Remove some now useless fixTemps
=============== Diff against Collections-ul.238 ===============
Item was changed:
----- Method: Heap>>indexUpdateBlock: (in category 'accessing') -----
indexUpdateBlock: aBlockOrNil
indexUpdateBlock := aBlockOrNil.
+
- indexUpdateBlock fixTemps.
!
Item was changed:
----- Method: SortedCollection>>sortBlock: (in category 'accessing') -----
sortBlock: aBlock
"Make the argument, aBlock, be the criterion for ordering elements of the
receiver."
+ sortBlock := aBlock.
+ "sortBlocks with side effects may not work right"
- aBlock
- ifNotNil: [sortBlock := aBlock fixTemps]
- ifNil: [sortBlock := aBlock].
- "The sortBlock must copy its home context, so as to avoid circularities!!"
- "Therefore sortBlocks with side effects may not work right"
self size > 0 ifTrue: [self reSort]!
Item was changed:
----- Method: Heap>>sortBlock: (in category 'accessing') -----
sortBlock: aBlock
sortBlock := aBlock.
- sortBlock fixTemps.
self reSort.!
Item was changed:
----- Method: SortedCollection>>reverseInPlace (in category 'converting') -----
reverseInPlace
"Change this colleciton into its reversed.
Do not make a copy like reversed do, but change self in place."
| newFirstIndex oldSortBlock |
newFirstIndex := 1 + array size - lastIndex.
lastIndex := 1 + array size - firstIndex.
firstIndex := newFirstIndex.
array := array reversed.
oldSortBlock := (sortBlock ifNil: [[:a :b | a <= b]]) copy.
+ sortBlock := [:a :b | oldSortBlock value: b value: a]!
- sortBlock := [:a :b | oldSortBlock value: b value: a] fixTemps!