Skip to content

Commit

Permalink
Fix to Symbol rehash. Thanks Andrés.
Browse files Browse the repository at this point in the history
  • Loading branch information
jvuletich committed Dec 1, 2024
1 parent d0e64fa commit 4a0dc1b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
29 changes: 29 additions & 0 deletions CoreUpdates/6878-fix-JuanVuletich-2024Dec01-11h14m-jmv.001.cs.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'From Cuis7.1 [latest update: #6877] on 1 December 2024 at 11:16:43 am'!

!AddParameter class methodsFor: 'instance creation - private' stamp: 'jmv 12/1/2024 11:14:22'!
newSelectorAdding: aNewKeyword at: anIndex to: anOldSelector

| keywords |

keywords := anOldSelector keywords asOrderedCollection.
keywords add: aNewKeyword beforeIndex: anIndex.

^(String streamContents: [ :strm | keywords do: [ :keyword | strm nextPutAll: keyword ]]) asSymbol.

! !


!RemoveParameter class methodsFor: 'instance creation - private' stamp: 'jmv 12/1/2024 11:14:15'!
newSelectorConcatenating: oldSelectorKeywords removingAt: anIndex

| keywords |

keywords := oldSelectorKeywords asOrderedCollection.
keywords removeIndex: anIndex.

^(String streamContents: [ :strm | keywords do: [ :keyword | strm nextPutAll: keyword ]]) asSymbol.! !

!methodRemoval: UnicodeSymbol class #fromCollectionOfStrings: stamp: 'jmv 12/1/2024 11:15:59'!
UnicodeSymbol class removeSelector: #fromCollectionOfStrings:!
!methodRemoval: Symbol class #fromCollectionOfStrings: stamp: 'jmv 12/1/2024 11:15:58'!
Symbol class removeSelector: #fromCollectionOfStrings:!
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'From Cuis7.1 [latest update: #6770] on 1 December 2024 at 1:41:12 am'!

!SymbolSet methodsFor: 'private' stamp: 'sqr 12/1/2024 01:40:24'!
rehashSymbolClass: aClass

aClass allInstances do:
[:symbol | self basicInternNew: symbol withHash: symbol hash]! !


!SymbolSet methodsFor: 'lookup' stamp: 'sqr 12/1/2024 01:40:51'!
rehash

| newBuckets |
newBuckets := self newBuckets: self newBucketCount sized: self initialBucketSize.
self buckets: newBuckets.
self rehashSymbolClass: Symbol.
self rehashSymbolClass: UnicodeSymbol! !

0 comments on commit 4a0dc1b

Please sign in to comment.