[squeak-dev] The Trunk: System-eem.1243.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Oct 10 01:04:18 UTC 2021


Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1243.mcz

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

Name: System-eem.1243
Author: eem
Time: 9 October 2021, 6:04:14.414339 pm
UUID: e670b073-df3e-460e-a8fe-a019a11bede8
Ancestors: System-eem.1242

oops; fix slip in shared pool search.

=============== Diff against System-eem.1242 ===============

Item was changed:
  ----- Method: SystemNavigation>>allUnreferencedClassVariablesOf: (in category 'query') -----
  allUnreferencedClassVariablesOf: aClass
  	"Answer a list of the names of all the receiver's unreferenced class vars,
  	 including those defined in superclasses."
  	| unusedClassVars sequence |
  	aClass isMeta ifTrue:
  		[^self allUnreferencedClassVariablesOf: aClass theNonMetaClass].
  	unusedClassVars := Set new.
  	aClass withAllSuperclasses do:
  		[:class| unusedClassVars addAll: class classPool associations].
  	(aClass includesBehavior: SharedPool)
  		ifTrue:
  			[self allSelectorsAndMethodsDo:
+ 					[:b :s :m|
- 					[:s :m|
  					m allLiteralsDo: [:l| l isVariableBinding ifTrue: [unusedClassVars remove: l ifAbsent: nil]]]]
  		ifFalse:
  			[aClass withAllSuperclasses, (aClass withAllSuperclasses collect: [:class| class class]) do:
  				[:behavior |
  				behavior selectorsAndMethodsDo:
  					[:s :m|
  					m allLiteralsDo: [:l| l isVariableBinding ifTrue: [unusedClassVars remove: l ifAbsent: nil]]].
  				unusedClassVars isEmpty ifTrue: [^OrderedCollection new]]].
  	"now compute the order in which to present the unused varables..."
  	sequence := OrderedCollection new.
  	aClass withAllSuperclasses reverseDo:
  		[:aSuperClass |
  		sequence addAll: (aSuperClass classVarNames select:
  							[:classVarName|
  							unusedClassVars includes: (aSuperClass classPool associationAt: classVarName)])].
  	^sequence!



More information about the Squeak-dev mailing list