The Trunk: Tools-ul.422.mcz

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

The Trunk: Tools-ul.422.mcz

commits-2
Levente Uzonyi uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ul.422.mcz

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

Name: Tools-ul.422
Author: ul
Time: 3 September 2012, 11:54:59.7 am
UUID: 5abcf237-40bb-2143-85a6-595721d615c2
Ancestors: Tools-dtl.421

PointerExplorer enhancements:
- weak-only referers are shown at the end of the list and their identityHash is surrounded by parentheses
- refering contexts created by the explorer invocation from a workspace are not listed

=============== Diff against Tools-dtl.421 ===============

Item was changed:
  ----- Method: PointerExplorerWrapper>>contents (in category 'accessing') -----
  contents
+ "Return the wrappers with the objects holding references to item. Eldest objects come first, weak only referencers are at the end and have parentheses around their identity hash."
+
+ | objects weakOnlyReferences |
+ objects := item inboundPointersExcluding: { self. model }.
+ weakOnlyReferences := OrderedCollection new.
+ objects removeAllSuchThat: [ :each |
+ each class == self class
+ or: [ each class == PointerExplorer
+ or: [ (each class == MethodContext
+ and: [ each receiver class == PointerExplorer ] )
+ or: [ (each pointsOnlyWeaklyTo: item)
+ ifTrue: [ weakOnlyReferences add: each. true ]
+ ifFalse: [ false ] ] ] ] ].
+ ^(objects replace: [ :each |
+ self class with: each name: each identityHash asString model: item ])
+ addAll: (weakOnlyReferences replace: [ :each |
+ self class with: each name: '(', each identityHash asString, ')' model: item ]);
+ yourself!
- | objects |
- objects := Utilities pointersTo: item except: (Array with: self).
- ^(objects reject: [:ea | ea class = self class or: [ea class = PointerExplorer]])
- collect: [:ea| self class with: ea name: ea identityHash asString model: item]!