[squeak-dev] The Trunk: Kernel-eem.1415.mcz
Eliot Miranda
eliot.miranda at gmail.com
Tue Sep 21 14:23:50 UTC 2021
> On Sep 20, 2021, at 3:40 PM, commits at source.squeak.org wrote:
>
> Eliot Miranda uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-eem.1415.mcz
I did no such thing :-). I don’t know why it’s reported like this. I too prefer Levente’s changes because of the reasons he gives (no duplicated code; one point of grow) and because his doesn’t break update.
I had a change set of my version but I didn’t test all eight permutations on the change set with the addition first; I tested only one. I suspect Marcel is right, that a few of these permutations break compilation, and that a configuration would be required to add them reliably.
>
> ==================== 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 ]!
>
>
More information about the Squeak-dev
mailing list
|