[squeak-dev] The Trunk: Collections-ul.425.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Feb 12 00:31:50 UTC 2011


Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.425.mcz

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

Name: Collections-ul.425
Author: ul
Time: 12 February 2011, 1:17:09.686 am
UUID: 6f203d66-93a8-c847-bccc-296f68b45d03
Ancestors: Collections-ul.424

- bytecode optimized Set >> #includes:
- removed Dictionary >> #includes: (Collection's is basically the same and Dictionary is not a subclass of Set anymore)
- simplified String >> #isAsciiString

=============== Diff against Collections-ul.424 ===============

Item was removed:
- ----- Method: Dictionary>>includes: (in category 'testing') -----
- includes: anObject
- 
- 	self do: [:each | anObject = each ifTrue: [^true]].
- 	^false!

Item was changed:
  ----- Method: KeyedSet>>includes: (in category 'testing') -----
  includes: anObject 
+ 	
+ 	(array at: (self scanFor: (keyBlock value: anObject))) ifNil: [ ^false ] ifNotNil: [ ^true ]!
- 	^ (array at: (self scanFor: (keyBlock value: anObject))) ~~ nil!

Item was changed:
  ----- Method: Set>>includes: (in category 'testing') -----
  includes: anObject 
+ 	
+ 	(array at: (self scanFor: anObject)) ifNil: [ ^false ] ifNotNil: [ ^true ]!
- 	^ (array at: (self scanFor: anObject)) ~~ nil!

Item was changed:
  ----- Method: String>>isAsciiString (in category 'testing') -----
  isAsciiString
  
+ 	^self allSatisfy: [ :each | each asciiValue <= 127 ]!
- 	| c |
- 	c := self detect: [:each | each asciiValue > 127] ifNone: [nil].
- 	^ c isNil.
- !

Item was changed:
  ----- Method: WeakSet>>includes: (in category 'testing') -----
  includes: anObject 
  	
+ 	(array at: (self scanFor: anObject))
+ 		ifNil: [ ^false ]
+ 		ifNotNil: [ :object | ^object ~~ flag ]!
- 	^(array at: (self scanFor: anObject))
- 		ifNil: [ false ]
- 		ifNotNil: [ :object | object ~~ flag ]!




More information about the Squeak-dev mailing list