May be you can look at HashedCollection (the superclass of Dictionary and Set)

   addWhileGrowing: value [
        "Private - Add the newObject association to the receiver. Don't check 
for
         the set to be full - we want SPEED!."

        <category: 'private methods'>
        self primAt: (self findElementIndex: value) put: value.
        tally := tally + 1.
        ^value
     ]

    findElementIndex: anObject [
        "Tries to see where anObject can be placed as an indexed variable.
         As soon as nil is found, the index of that slot is answered.
         anObject also comes from an indexed variable."

        <category: 'private methods'>
        | index size element |
        self beConsistent.

        "Sorry for the lack of readability, but I want speed... :-)"
index := (anObject hash scramble bitAnd: (size := self primSize) - 1) + 1.

        [(element := self primAt: index) isNil
            ifTrue: [^index].
        index == size ifTrue: [index := 1] ifFalse: [index := index + 1]]
                repeat
    ]


(I use the GIT version of GST)

I think this has been there for years.

(Ralph, no offense intended of course. I understand the difficulty in reading a complex system and I understand you are used to having a browser. Luckily it's just a few months away... ;-)

Paolo


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to