The Trunk: Collections-mt.859.mcz

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

The Trunk: Collections-mt.859.mcz

commits-2
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.859.mcz

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

Name: Collections-mt.859
Author: mt
Time: 18 November 2019, 10:35:50.278051 am
UUID: e09e1b73-88f1-8c48-a741-ed021620da1e
Ancestors: Collections-ct.857, Collections-nice.858

Merge to complement CollectionsTests-mt.324.

=============== Diff against Collections-nice.858 ===============

Item was changed:
  ----- Method: OrderedDictionary>>postCopyFrom:to: (in category 'copying') -----
  postCopyFrom: startIndex to: endIndex
  "Adapted from SequenceableCollection and OrderedCollection."
 
  | oldOrder |
  oldOrder := order.
  array := self class arrayType
  new: (self class goodPrimeAtLeast: endIndex - startIndex + 1 * 4 // 3). "fill 75% to 100%"
  order := self class arrayType
+ new: array size + 1 * 3 // 4. "remove 25%"
- new: array size * 3 // 4. "remove 25%"
 
  startIndex to: endIndex do: [:index | | element |
  element := (oldOrder at: index) copy.
  order at: index - startIndex + 1 put: element.
  array at: (self scanFor: element key) put: element].
 
  tally := endIndex - startIndex + 1.!