The Trunk: Collections-eem.366.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-eem.366.mcz

commits-2
Eliot Miranda uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-eem.366.mcz

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

Name: Collections-eem.366
Author: eem
Time: 29 June 2010, 5:26:30.834 pm
UUID: b8b3d29c-7d22-45a6-a235-aae3dd6316ea
Ancestors: Collections-ul.365

Much faster Dictionary>>unreferencedKeys (single pass
over class hierarchy) speeds up removeUnreferencedKeys.

=============== Diff against Collections-ul.365 ===============

Item was changed:
  ----- Method: Dictionary>>unreferencedKeys (in category 'removing') -----
  unreferencedKeys
+ "| uk | (Time millisecondsToRun: [uk := TextConstants unreferencedKeys]) -> uk"
- "TextConstants unreferencedKeys"
 
  ^'Scanning for references . . .'
  displayProgressAt: Sensor cursorPoint
  from: 0
+ to: Smalltalk classNames size * 2
- to: self size
  during:
+ [:bar | | currentClass n associations referencedAssociations |
+ currentClass := nil.
- [:bar |
- | n |
  n := 0.
+ associations := self associations asIdentitySet.
+ referencedAssociations := IdentitySet new: associations size.
+ self systemNavigation allSelect:
+ [:m|
+ m methodClass ~~ currentClass ifTrue:
+ [currentClass := m methodClass.
+ bar value: (n := n + 1)].
+ m literalsDo:
+ [:l|
+ (l isVariableBinding and: [associations includes: l]) ifTrue:
+ [referencedAssociations add: l]].
+ false].
+ ((associations reject: [:assoc | referencedAssociations includes: assoc]) collect: [:assoc| assoc key]) asSet]!
- self keys select:
- [:key |
- bar value: (n := n + 1).
- (self systemNavigation allCallsOn: (self associationAt: key)) isEmpty]]!