--- orig/kernel/Dictionary.st +++ mod/kernel/Dictionary.st @@ -487,6 +487,22 @@ rehash !Dictionary methodsFor: 'private methods'! +whileGrowingAt: key put: value + "Private - Add the given key/value association to the receiver. Don't check + for the set to be full - we want SPEED!." + self addWhileGrowing: key -> value +! + +deepCopy + "Returns a deep copy of the receiver (the keys and values are + copies of the receiver's instance variables)" + | newDictionary | + newDictionary := self copyEmpty: self capacity. + self keysAndValuesDo: [ :k :v | + newDictionary whileGrowingAt: k copy put: v copy ]. + ^newDictionary +! + keysClass "Private - Answer the class answered by #keys" ^Set