Eliot Miranda uploaded a new version of ShoutCore to project The Trunk:
http://source.squeak.org/trunk/ShoutCore-eem.62.mcz
==================== Summary ====================
Name: ShoutCore-eem.62
Author: eem
Time: 29 November 2018, 2:00:34.775887 pm
UUID: 45629ac9-52a5-412c-9bf1-493a0ac2ea36
Ancestors: ShoutCore-tpr.61
Fix a bug in SHMCClassDefinition>>sharedPools that answered nil as the pool for a missing pool, and hence broke khighlighting in the Monticello package browser when browsing older version s with different pool dictionary definitions.
=============== Diff against ShoutCore-tpr.61 ===============
Item was changed:
----- Method: SHMCClassDefinition>>sharedPools (in category 'act like a class') -----
sharedPools
| d |
d := Set new.
+ classDefinition poolDictionaries do:
+ [:poolName|
+ (Smalltalk at: poolName asSymbol ifAbsent:[nil]) ifNotNil: [:pool| d add: pool]].
- classDefinition poolDictionaries do:[:each |
- d add: (Smalltalk at: each asSymbol ifAbsent:[nil]) ].
^d!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1199.mcz
==================== Summary ====================
Name: Kernel-eem.1199
Author: eem
Time: 24 November 2018, 3:19:28.081135 pm
UUID: 7d8e709b-a9c9-49ad-b733-e34ce715a79c
Ancestors: Kernel-eem.1198
Remove a mistaken halt from the postscript of the previous commit.
=============== Diff against Kernel-eem.1198 ===============
Item was changed:
(PackageInfo named: 'Kernel') postscript: '"below, add code to be run after the loading of this package"
"Since Kernel-eem.1198 redefines LargePositiveInteger hash,
rehash all hashed collections that contain hashed large integers."
HashedCollection allSubclassesDo:
[:c| | f |
f := (c includesBehavior: Set)
ifTrue: [[:i| i]]
ifFalse: [[:i| i keys]].
c allInstancesDo:
[:h|
((f value: h) detect: [:e| e isInteger and: [e class ~~ SmallInteger]] ifNone: nil) ifNotNil:
+ [h rehash]]]'!
- [h halt rehash]]]'!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1198.mcz
==================== Summary ====================
Name: Kernel-eem.1198
Author: eem
Time: 24 November 2018, 1:44:47.526422 pm
UUID: 100137c4-2514-4b7f-9064-3dcdfe7d8cc9
Ancestors: Kernel-eem.1197
Redefine LargePositiveInteger hash for compatibility between 32-bit and 64-bit systems.
=============== Diff against Kernel-eem.1197 ===============
Item was changed:
----- Method: LargePositiveInteger>>hash (in category 'comparing') -----
hash
+ "Answer an integer value that is related to the value of the receiver.
+ Take care that the hash value is the same in both 32-bit and 64-bit versions.
+ Since the integers are by definition perfectly distributed a SmallInteger's hash is itself
+ (it is impossible to derive a hash function that is better distributed than the SmallIntegers
+ themselves). Therefore, for integers that could possibly fit in the SmallInteger range, answer
+ self. For values well outside of the SmallInteger range on 64-bits answer a hash that avoids
+ large integer arithmetic."
+ ^self digitLength <= 8
+ ifTrue: [self]
+ ifFalse:
+ [ByteArray
+ hashBytes: self
+ startingWith: self species hash]!
-
- ^ByteArray
- hashBytes: self
- startingWith: self species hash!
Item was changed:
----- Method: SmallInteger>>hash (in category 'comparing') -----
hash
+ "Answer an integer value that is related to the value of the receiver.
+ Since the integers are by definition perfectly distributed answer self
+ (it is impossible to derive a hash function that is better distributed
+ than the SmallIntegers themselves). c.f. LargePositiveInteger hash."
^self!
Item was changed:
(PackageInfo named: 'Kernel') postscript: '"below, add code to be run after the loading of this package"
+ "Since Kernel-eem.1198 redefines LargePositiveInteger hash,
+ rehash all hashed collections that contain hashed large integers."
+ HashedCollection allSubclassesDo:
+ [:c| | f |
+ f := (c includesBehavior: Set)
+ ifTrue: [[:i| i]]
+ ifFalse: [[:i| i keys]].
+ c allInstancesDo:
+ [:h|
+ ((f value: h) detect: [:e| e isInteger and: [e class ~~ SmallInteger]] ifNone: nil) ifNotNil:
+ [h halt rehash]]]'!
- ((ByteArray subclasses includes: CompiledMethod)
- and: [CompiledMethod superclass ~= ByteArray]) ifTrue:
- [ByteArray removeSubclass: CompiledMethod].
- (Smalltalk classNamed: #FullBlockClosure) ifNotNil:
- [:fbc|
- (fbc identityHash ~= 38) ifTrue:
- [fbc tryPrimitive: 161 withArgs: #(38 true)]]'!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1197.mcz
==================== Summary ====================
Name: Kernel-eem.1197
Author: eem
Time: 20 November 2018, 1:43:36.839917 pm
UUID: bf505221-c2ce-4adb-8f51-144901828649
Ancestors: Kernel-eem.1196
Define #= and #hash for Message such that distinct Messages with the identical selector and lookupClass, and literalEqual: arguments are equal.
=============== Diff against Kernel-eem.1196 ===============
Item was added:
+ ----- Method: Message>>= (in category 'comparing') -----
+ = anObject
+ ^self class == anObject class
+ and: [selector == anObject selector "selector lookup is by identity"
+ and: [lookupClass == anObject lookupClass
+ and: [args literalEqual: anObject arguments]]]!
Item was added:
+ ----- Method: Message>>hash (in category 'comparing') -----
+ hash
+ "#hash is implemented, because #= is implemented."
+ ^(selector hash bitXor: args hash) bitXor: lookupClass hash!
Eliot Miranda uploaded a new version of SUnit to project The Trunk:
http://source.squeak.org/trunk/SUnit-eem.113.mcz
==================== Summary ====================
Name: SUnit-eem.113
Author: eem
Time: 19 November 2018, 9:53:01.453709 am
UUID: 7071263a-3791-4acb-bdac-70931fffb7f6
Ancestors: SUnit-ul.112
Add deny:equals: to complement assert:equals:
=============== Diff against SUnit-ul.112 ===============
Item was added:
+ ----- Method: TestCase>>deny:equals: (in category 'accessing') -----
+ deny: unexpected equals: actual
+
+ ^self
+ deny: unexpected = actual
+ description: 'Actual equals unexpected'
+ !
Chris Muller uploaded a new version of Chronology-Tests to project The Trunk:
http://source.squeak.org/trunk/Chronology-Tests-cmm.11.mcz
==================== Summary ====================
Name: Chronology-Tests-cmm.11
Author: cmm
Time: 17 November 2018, 10:40:40.86556 pm
UUID: 13d8a1e2-6c40-453d-ae49-ea6326bac912
Ancestors: Chronology-Tests-dtl.10
New test to expose critical bug in the proposed UTCDateAndTime.
=============== Diff against Chronology-Tests-dtl.10 ===============
Item was added:
+ ----- Method: DateAndTimeTest>>testRestoreFromChronologyTicksAndOffset (in category 'Tests') -----
+ testRestoreFromChronologyTicksAndOffset
+ "Legacy serialized instances are made up of 3 SmallIntegers knowns as 'ticks' plus an 'offset' Duration. Ensure a serialized DateAndTime can be correctly restored from these values."
+ | dt newDt |
+ dt := '2018-11-17T14:19:42.887676-06:00' asDateAndTime.
+ newDt := DateAndTime basicNew ticks: dt ticks offset: dt offset.
+ self assert: dt = newDt!
Chris Cunningham uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-cbc.296.mcz
==================== Summary ====================
Name: CollectionsTests-cbc.296
Author: cbc
Time: 28 October 2018, 5:12:30.875512 pm
UUID: 12a1d6bf-85c7-8d40-aa1c-022556c1cb18
Ancestors: CollectionsTests-topa.295
Test for #hash and #= bugs. In anticipation of fixing these.
=============== Diff against CollectionsTests-topa.295 ===============
Item was added:
+ ----- Method: IntervalTest>>testHashBug3380 (in category 'tests') -----
+ testHashBug3380
+ "Array and Interval equate, but their hashes didn't. Test that this is fixed.
+ It is about mantis bug http://bugs.squeak.org/view.php?id=6455"
+ | interval array |
+ interval := (1 to: 3).
+ array:= #(1 2 3).
+ self assert: interval equals: array.
+ self assert: interval hash equals: array hash.!
Item was added:
+ ----- Method: IntervalTest>>testHashEqualIfIntervalEqual (in category 'tests') -----
+ testHashEqualIfIntervalEqual
+ | interval1 interval2 |
+ interval1 := 0 to: 1.
+ interval2 := 0 to: 5/3. "Taken from an actual issue in an image"
+ self assert: interval1 equals: interval2.
+ self assert: interval1 hash equals: interval2 hash.!