[squeak-dev] The Trunk: Kernel-eem.1415.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Tue Sep 21 07:39:20 UTC 2021


This breaks Trunk update because we have no control over load order within a single package. Therefore, MNU MethodDictionary >> #atNewIndex:putValue:. I will take a look at it.

Best,
Marcel
Am 21.09.2021 00:40:57 schrieb commits at source.squeak.org <commits at source.squeak.org>:
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1415.mcz

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

Name: Kernel-eem.1415
Author: eem
Time: 20 September 2021, 3:40:41.04035 pm
UUID: b3b62e4b-49b1-4463-93de-6c69109de02d
Ancestors: Kernel-eem.1414

An alternative fix to http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-September/216529.html

c.f. Kernel-ul.1415

=============== Diff against Kernel-eem.1414 ===============

Item was added:
+ ----- Method: MethodDictionary>>add: (in category 'adding') -----
+ add: anAssociation
+
+ | index |
+ index := self scanFor: anAssociation key.
+ (array at: index)
+ ifNil: [ self atNewIndex: index put: anAssociation ]
+ ifNotNil: [ array at: index put: anAssociation value ].
+ ^anAssociation!

Item was changed:
----- Method: MethodDictionary>>at:put: (in category 'accessing') -----
at: key put: value
"Set the value at key to be value."

| index |
index := self scanFor: key.
(self basicAt: index)
ifNil: [
self
basicAt: index put: key;
+ atNewIndex: index putValue: value ]
- atNewIndex: index put: value ]
ifNotNil: [
(array at: index) flushCache.
array at: index put: value ].
^value!

Item was added:
+ ----- Method: MethodDictionary>>atNewIndex:put: (in category 'private') -----
+ atNewIndex: index put: anAssociation
+ "Override to deal with the internal organization of MethodDIctionaries
+ which, to suit the VM, do not use Associations."
+ self assert: anAssociation isVariableBinding.
+ self basicAt: index put: anAssociation key.
+ array at: index put: anAssociation value.
+ tally := tally + 1.
+ "Keep array at least 1/4 free for decent hash behavior"
+ array size * 3 < (tally * 4) ifTrue: [ self grow ]!

Item was added:
+ ----- Method: MethodDictionary>>atNewIndex:putValue: (in category 'private') -----
+ atNewIndex: index putValue: anObject
+ "Override to deal with the internal organization of MethodDIctionaries
+ which, to suit the VM, do not use Associations."
+ array at: index put: anObject.
+ tally := tally + 1.
+ "Keep array at least 1/4 free for decent hash behavior"
+ array size * 3 < (tally * 4) ifTrue: [ self grow ]!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210921/d70df807/attachment.html>


More information about the Squeak-dev mailing list