Bert Freudenberg uploaded a new version of PackageInfo-Base to project The Trunk:
http://source.squeak.org/trunk/PackageInfo-Base-bf.64.mcz
==================== Summary ====================
Name: PackageInfo-Base-bf.64
Author: bf
Time: 28 July 2012, 2:13:11.917 pm
UUID: 507e2d95-0634-454b-9ab1-3401c8575d06
Ancestors: PackageInfo-Base-bf.63
Improve PackageInfo class comment.
=============== Diff against PackageInfo-Base-bf.63 ===============
Item was changed:
Object subclass: #PackageInfo
instanceVariableNames: 'packageName methodCategoryPrefix preamble postscript preambleOfRemoval postscriptOfRemoval'
classVariableNames: ''
poolDictionaries: ''
category: 'PackageInfo-Base'!
PackageInfo class
instanceVariableNames: 'default'!
+ !PackageInfo commentStamp: 'bf 7/28/2012 14:11' prior: 0!
+ PackageInfo is used by the system to figure out which classes and methods belong to which package. By default, class categories and method categories are matched against my packageName, but subclasses could override this behavior.
+
+ For an interesting use of PackageInfo subclasses have a look at OMeta2. It presents the same code base as two different packages, one using decompiled code for bootstrapping, the other using the actual OMeta syntax.!
- !PackageInfo commentStamp: '<historical>' prior: 0!
- Subclass this class to create new Packages.!
PackageInfo class
instanceVariableNames: 'default'!
Bert Freudenberg uploaded a new version of PackageInfo-Base to project The Trunk:
http://source.squeak.org/trunk/PackageInfo-Base-bf.64.mcz
==================== Summary ====================
Name: PackageInfo-Base-bf.64
Author: bf
Time: 28 July 2012, 2:13:11.917 pm
UUID: 507e2d95-0634-454b-9ab1-3401c8575d06
Ancestors: PackageInfo-Base-bf.63
Improve PackageInfo class comment.
=============== Diff against PackageInfo-Base-bf.63 ===============
Item was changed:
Object subclass: #PackageInfo
instanceVariableNames: 'packageName methodCategoryPrefix preamble postscript preambleOfRemoval postscriptOfRemoval'
classVariableNames: ''
poolDictionaries: ''
category: 'PackageInfo-Base'!
PackageInfo class
instanceVariableNames: 'default'!
+ !PackageInfo commentStamp: 'bf 7/28/2012 14:11' prior: 0!
+ PackageInfo is used by the system to figure out which classes and methods belong to which package. By default, class categories and method categories are matched against my packageName, but subclasses could override this behavior.
+
+ For an interesting use of PackageInfo subclasses have a look at OMeta2. It presents the same code base as two different packages, one using decompiled code for bootstrapping, the other using the actual OMeta syntax.!
- !PackageInfo commentStamp: '<historical>' prior: 0!
- Subclass this class to create new Packages.!
PackageInfo class
instanceVariableNames: 'default'!
Bert Freudenberg uploaded a new version of PackageInfo-Base to project The Trunk:
http://source.squeak.org/trunk/PackageInfo-Base-bf.64.mcz
==================== Summary ====================
Name: PackageInfo-Base-bf.64
Author: bf
Time: 28 July 2012, 2:13:11.917 pm
UUID: 507e2d95-0634-454b-9ab1-3401c8575d06
Ancestors: PackageInfo-Base-bf.63
Improve PackageInfo class comment.
=============== Diff against PackageInfo-Base-bf.63 ===============
Item was changed:
Object subclass: #PackageInfo
instanceVariableNames: 'packageName methodCategoryPrefix preamble postscript preambleOfRemoval postscriptOfRemoval'
classVariableNames: ''
poolDictionaries: ''
category: 'PackageInfo-Base'!
PackageInfo class
instanceVariableNames: 'default'!
+ !PackageInfo commentStamp: 'bf 7/28/2012 14:11' prior: 0!
+ PackageInfo is used by the system to figure out which classes and methods belong to which package. By default, class categories and method categories are matched against my packageName, but subclasses could override this behavior.
+
+ For an interesting use of PackageInfo subclasses have a look at OMeta2. It presents the same code base as two different packages, one using decompiled code for bootstrapping, the other using the actual OMeta syntax.!
- !PackageInfo commentStamp: '<historical>' prior: 0!
- Subclass this class to create new Packages.!
PackageInfo class
instanceVariableNames: 'default'!
Nicolas Cellier uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-nice.154.mcz
==================== Summary ====================
Name: Tests-nice.154
Author: nice
Time: 27 July 2012, 8:14:03.431 pm
UUID: fa846130-25ce-4a75-bcee-212b658a274a
Ancestors: Tests-cwp.153
Use a workaround for testBecomeIdentityHash knowing that two objects created consecutively may share same identityHash.
=============== Diff against Tests-cwp.153 ===============
Item was changed:
----- Method: BecomeTest>>testBecomeIdentityHash (in category 'Testing') -----
testBecomeIdentityHash
| a b c d numberOfRetry newAIdentityHash newBIdentityHash oldAIdentityHash oldBIdentityHash |
numberOfRetry := 0.
[a := 'ab' copy.
+ c := IdentitySet new: 1000.
b := 'cd' copy.
+ d := IdentitySet new: 1000.
"Note: the sets are allocated with enough room to reduce probability that two different hash lead to same slot"
+ "Note2: a & b creation are interleaved with c & d, because some VM allocate the same identityHash for two consecutively created objects"
+ c add: a; add: b.
+ d add: a.
- (c := IdentitySet new: 1000) add: a; add: b.
- (d := IdentitySet new: 1000) add: a.
oldAIdentityHash := a identityHash.
oldBIdentityHash := b identityHash.
oldAIdentityHash = oldBIdentityHash and: [numberOfRetry < 10]]
whileTrue: [numberOfRetry := numberOfRetry + 1].
self assert: oldAIdentityHash ~= oldBIdentityHash description: 'The VM is spawning too many equal identityHash to be honest'.
a become: b.
newAIdentityHash := a identityHash.
newBIdentityHash := b identityHash.
self
"The set c & d can still retrieve their elements because elements did not change their expected position"
assert: (c includes: a);
assert: (c includes: b);
assert: (d includes: a);
deny: (d includes: b);
"Elements didn't change their expected position because identityHash did not change"
assert: oldAIdentityHash = newAIdentityHash;
assert: oldBIdentityHash = newBIdentityHash!