The Trunk: Tools-mtf.208.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-mtf.208.mcz

commits-2
Matthew Fulmer uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mtf.208.mcz

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

Name: Tools-mtf.208
Author: mtf
Time: 10 March 2010, 7:35:56.904 pm
UUID: e279ff32-a662-4095-b02b-7e76d40588c9
Ancestors: Tools-ul.207

Part 4 of 4 of the fix for
http://bugs.squeak.org/view.php?id=7158

=============== Diff against Tools-ul.207 ===============

Item was changed:
  ----- Method: PointerExplorerWrapper>>contents (in category 'accessing') -----
  contents
  | objects |
+ objects := Utilities pointersTo: item except: (Array with: self).
+ ^(objects reject: [:ea | ea class = self class or: [ea class = PointerExplorer]])
- objects := Utilities pointersTo: item except: (Array with: self with: model).
- ^(objects reject: [:ea | ea class = self class])
  collect: [:ea| self class with: ea name: ea identityHash asString model: item]!

Item was changed:
  ----- Method: PointerFinder class>>pointersTo:except: (in category 'utilities') -----
  pointersTo: anObject except: objectsToExclude
  "Find all occurrences in the system of pointers to the argument anObject.
  Remove objects in the exclusion list from the results."
 
+ ^ anObject inboundPointersExcluding: objectsToExclude!
- | results anObj lastObj |
- Smalltalk garbageCollect.
- "big collection shouldn't grow, so it's contents array is always the same"
- results := OrderedCollection new: 1000.
-
- "allObjectsDo: is expanded inline to keep spurious
- method and block contexts out of the results"
- anObj := self someObject.
- lastObj := Object new.
- [lastObj == anObj] whileFalse: [
- anObj isInMemory ifTrue: [
- (anObj pointsTo: anObject) ifTrue: [
- "exclude the results collector and contexts in call chain"
- ((anObj ~~ results collector) and:
- [(anObj ~~ objectsToExclude) and:
- [(anObj ~~ thisContext) and:
- [(anObj ~~ thisContext sender) and:
- [anObj ~~ thisContext sender sender]]]])
- ifTrue: [ results add: anObj ].
- ]].
- anObj := anObj nextObject.
- ].
- objectsToExclude do: [ :obj | results removeAllSuchThat: [ :el | el == obj]].
-
- ^ results asArray
- !

Item was changed:
  ----- Method: PointerFinder>>followObject: (in category 'application') -----
  followObject: anObject
+ anObject outboundPointersDo: [:ea |
+ (self follow: ea from: anObject)
- (self follow: anObject class from: anObject)
- ifTrue: [^ true].
- "Remove this after switching to new CompiledMethod format --bf 2/12/2006"
- anObject isCompiledMethod ifTrue: [
- 1 to: anObject numLiterals do:
- [:i |
- (self follow: (anObject literalAt: i) from: anObject)
- ifTrue: [^ true]].
- ^false].
- 1 to: anObject class instSize do:
- [:i |
- (self follow: (anObject instVarAt: i) from: anObject)
  ifTrue: [^ true]].
- 1 to: anObject basicSize do:
- [:i |
- (self follow: (anObject basicAt: i) from: anObject)
- ifTrue: [^ true]].
  ^ false!