[squeak-dev] The Trunk: System-dtl.462.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Dec 8 00:37:37 UTC 2011
David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.462.mcz
==================== Summary ====================
Name: System-dtl.462
Author: dtl
Time: 7 December 2011, 7:36:57.561 pm
UUID: d28ec1e6-67ed-4068-94bd-88fe4c76e310
Ancestors: System-dtl.461
For Squeak 4.3 release code freeze, temporarily revert previous ReferenceStream changes due to unresolved issues (see http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-December/162386.html). The updates will be reintroduced following the Squeak 4.3 release.
Packages affected:
Kernel-Objects
System-Object Storage
Tests-Object Storage
=============== Diff against System-dtl.461 ===============
Item was changed:
----- Method: DiskProxy>>storeDataOn: (in category 'i/o') -----
+ storeDataOn: aDataStream
- storeDataOn: aReferenceStream
"Besides just storing, get me inserted into references, so structures will know about class DiskProxy."
+ super storeDataOn: aDataStream.
+ aDataStream references at: self put: #none.
+ "just so instVarInfo: will find it and put it into structures"!
- super storeDataOn: aReferenceStream.
-
- "just so instVarInfo: will find it and put it into structures"
- " aReferenceStream references at: self put: #none."
- aReferenceStream addSpecialReference: self!
Item was removed:
- ----- Method: ReferenceStream>>addSpecialReference: (in category 'writing') -----
- addSpecialReference: aDiskProxy
- "See senders. Added to avoid breaking encapsulation (assuming that #references would answer the actual collection)"
- references at: aDiskProxy put: #none!
Item was changed:
----- Method: ReferenceStream>>references (in category 'writing') -----
references
+ ^ references!
- "Do not include provisory references created in #nextPutWeak that never became normal references,
- because the referenced object was never added from a call to #nextPut:"
- ^ references select: [ :value | value isNumber ]!
Item was changed:
----- Method: ReferenceStream>>statisticsOfRefs (in category 'statistics') -----
statisticsOfRefs
"Analyze the information in references, the objects being written out"
+ | parents ownerBags tallies n nm owners |
+ parents := IdentityDictionary new: references size * 2.
- | parents ownerBags tallies n nm owners normalReferences |
- normalReferences := self references. "Exclude unrealized weaks"
- parents := IdentityDictionary new: normalReferences size * 2.
n := 0.
'Finding Owners...'
+ displayProgressFrom: 0 to: references size
- displayProgressFrom: 0 to: normalReferences size
during: [:bar |
+ references keysDo:
- normalReferences keysDo:
[:parent | | kids |
bar value: (n := n+1).
kids := parent class isFixed
+ ifTrue: [(1 to: parent class instSize) collect: [:i | parent
+ instVarAt: i]]
- ifTrue: [(1 to: parent class instSize) collect: [:i | parent instVarAt: i]]
ifFalse: [parent class isBits ifTrue: [Array new]
+ ifFalse: [(1 to: parent basicSize) collect: [:i | parent basicAt:
+ i]]].
+ (kids select: [:x | references includesKey: x])
- ifFalse: [(1 to: parent basicSize) collect: [:i | parent basicAt: i]]].
- (kids select: [:x | normalReferences includesKey: x])
do: [:child | parents at: child put: parent]]].
ownerBags := Dictionary new.
tallies := Bag new.
n := 0.
'Tallying Owners...'
+ displayProgressFrom: 0 to: references size
- displayProgressFrom: 0 to: normalReferences size
during: [:bar |
+ references keysDo: "For each class of obj, tally a bag of owner
+ classes"
- normalReferences keysDo: "For each class of obj, tally a bag of owner classes"
[:obj | | objParent | bar value: (n := n+1).
nm := obj class name.
tallies add: nm.
owners := ownerBags at: nm ifAbsent: [ownerBags at: nm put: Bag new].
(objParent := parents at: obj ifAbsent: [nil]) == nil
ifFalse: [owners add: objParent class name]]].
^ String streamContents:
[:strm | tallies sortedCounts do:
[:assn | n := assn key. nm := assn value.
owners := ownerBags at: nm.
strm cr; nextPutAll: nm; space; print: n.
owners size > 0 ifTrue:
[strm cr; tab; print: owners sortedCounts]]]!
More information about the Squeak-dev
mailing list
|