The Trunk: System-mtf.293.mcz

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

The Trunk: System-mtf.293.mcz

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

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

Name: System-mtf.293
Author: mtf
Time: 10 March 2010, 7:30:46.292 pm
UUID: c9a3552b-e349-4cd4-be80-a3fe831afeee
Ancestors: System-ar.292

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

=============== Diff against System-ar.292 ===============

Item was changed:
  ----- Method: Utilities class>>pointersTo:except: (in category 'finding pointers') -----
  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!