[squeak-dev] The Trunk: System-nice.1149.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 30 10:51:03 UTC 2020


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

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

Name: System-nice.1149
Author: nice
Time: 30 March 2020, 12:50:26.196366 pm
UUID: ece53b0b-24d2-4d4b-bc91-6794a661f886
Ancestors: System-ul.1148

avoid neuron storming [...] doWhileTrue: true, it just means [...] repeat

There is no other sender of doWhileFalse: doWhileTrue: and my advice would be to deprecate them. YAGNI.

=============== Diff against System-ul.1148 ===============

Item was changed:
  ----- Method: MOFile>>searchByHash: (in category 'experimental') -----
  searchByHash: aString
  	| hashValue nstr index incr key |
  	hashValue :=  self hashPjw: aString.
  	incr := 1 + (hashValue \\ (hashTableSize -2)).
  	index := (hashValue \\ hashTableSize) .
  	[ 	nstr := (hashTable at: index +1 ).
  		nstr = 0 ifTrue: [^nil].
  		key := self originalString: nstr.
  		key = aString ifTrue: [^self translatedString: nstr].
  		index >= (hashTableSize - incr) 
  				ifTrue: [index := index - (hashTableSize - incr)  ]
  				ifFalse:[index := index + incr].	
+ 	] repeat!
- 	] doWhileTrue: true.!



More information about the Squeak-dev mailing list