[squeak-dev] The Trunk: Collections-nice.263.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Dec 26 00:37:17 UTC 2009


Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.263.mcz

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

Name: Collections-nice.263
Author: nice
Time: 26 December 2009, 1:36:40 am
UUID: 3afe82da-f0d8-46aa-b18e-647262d69692
Ancestors: Collections-nice.262

remove Dictionary>>#occurrencesOf: because same as super

=============== Diff against Collections-nice.262 ===============

Item was changed:
  ----- Method: Dictionary>>unreferencedKeys (in category 'removing') -----
  unreferencedKeys
  	"TextConstants unreferencedKeys"
  
- 	| n |
  	^'Scanning for references . . .' 
  		displayProgressAt: Sensor cursorPoint
  		from: 0
  		to: self size
  		during: 
  			[:bar | 
+ 			| n |
  			n := 0.
  			self keys select: 
  					[:key | 
  					bar value: (n := n + 1).
  					(self systemNavigation allCallsOn: (self associationAt: key)) isEmpty]]!

Item was changed:
  ----- Method: Dictionary>>associationDeclareAt: (in category 'accessing') -----
  associationDeclareAt: aKey
  	"Return an existing association, or create and return a new one.  Needed as a single message by ImageSegment.prepareToBeSaved."
  
- 	| existing |
  	^ self associationAt: aKey ifAbsent: [
+ 		| existing |
  		(Undeclared includesKey: aKey)
  			ifTrue: 
  				[existing := Undeclared associationAt: aKey.
  				Undeclared removeKey: aKey.
  				self add: existing]
  			ifFalse: 
  				[self add: aKey -> false]]!

Item was removed:
- ----- Method: Dictionary>>occurrencesOf: (in category 'testing') -----
- occurrencesOf: anObject 
- 	"Answer how many of the receiver's elements are equal to anObject."
- 
- 	| count |
- 	count := 0.
- 	self do: [:each | anObject = each ifTrue: [count := count + 1]].
- 	^count!




More information about the Squeak-dev mailing list