[squeak-dev] The Trunk: Collections-ul.445.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jul 18 18:24:09 UTC 2011
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.445.mcz
==================== Summary ====================
Name: Collections-ul.445
Author: ul
Time: 17 July 2011, 7:43:32.336 pm
UUID: 5bd8b975-3f30-9943-a793-48eeb8593e0e
Ancestors: Collections-ul.444
Use #allSelectorsAndMethodsDo: instead of #allSelect:.
=============== Diff against Collections-ul.444 ===============
Item was changed:
----- Method: Dictionary>>unreferencedKeys (in category 'removing') -----
unreferencedKeys
"| uk | (Time millisecondsToRun: [uk := TextConstants unreferencedKeys]) -> uk"
^'Scanning for references . . .'
displayProgressFrom: 0
to: Smalltalk classNames size * 2
+ during: [ :bar |
+ | currentClass n associations referencedAssociations |
- during:
- [:bar | | currentClass n associations referencedAssociations |
currentClass := nil.
n := 0.
associations := self associations asIdentitySet.
referencedAssociations := IdentitySet new: associations size.
+ self systemNavigation allSelectorsAndMethodsDo: [ :behavior :selector :method |
+ behavior == currentClass ifFalse: [
+ currentClass := behavior.
+ bar value: (n := n + 1) ].
+ method literalsDo: [ :literal |
+ (literal isVariableBinding and: [ associations includes: literal ]) ifTrue: [
+ referencedAssociations add: literal ] ] ].
+ (associations reject: [ :assoc | referencedAssociations includes: assoc ]) collect: [ :assoc| assoc key ] ]!
- 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]!
More information about the Squeak-dev
mailing list
|