[squeak-dev] The Inbox: Collections-ul.440.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Apr 26 00:43:46 UTC 2011
A new version of Collections was added to project The Inbox:
http://source.squeak.org/inbox/Collections-ul.440.mcz
==================== Summary ====================
Name: Collections-ul.440
Author: ul
Time: 26 April 2011, 2:37:08.897 am
UUID: 4c084629-af8b-3740-b919-ec87f228c915
Ancestors: Collections-kb.439
- ignore the leadingChar for unique characters in Character class >> #leadingChar:code:
- fixed the copying of Characters
=============== Diff against Collections-kb.439 ===============
Item was changed:
----- Method: Character class>>leadingChar:code: (in category 'instance creation') -----
leadingChar: leadChar code: code
code >= 16r400000 ifTrue: [
self error: 'code is out of range'.
].
leadChar >= 256 ifTrue: [
self error: 'lead is out of range'.
].
+ code < 256 ifTrue: [ ^self value: code ].
-
^self value: (leadChar bitShift: 22) + code.!
Item was changed:
----- Method: Character>>clone (in category 'copying') -----
clone
+ "Characters from 0 to 255 are unique, copy only the rest."
+
+ value < 256 ifTrue: [ ^self ].
+ ^super clone!
- "Answer with the receiver, because Characters are unique."!
Item was changed:
----- Method: Character>>copy (in category 'copying') -----
copy
+ "Characters from 0 to 255 are unique, copy only the rest."
+
+ value < 256 ifTrue: [ ^self ].
+ ^super copy!
- "Answer with the receiver because Characters are unique."!
Item was changed:
----- Method: Character>>deepCopy (in category 'copying') -----
deepCopy
+ "Characters from 0 to 255 are unique, copy only the rest."
+
+ value < 256 ifTrue: [ ^self ].
+ ^super deepCopy!
- "Answer with the receiver because Characters are unique."!
Item was added:
+ ----- Method: Character>>shallowCopy (in category 'copying') -----
+ shallowCopy
+ "Characters from 0 to 255 are unique, copy only the rest."
+
+ value < 256 ifTrue: [ ^self ].
+ ^super shallowCopy!
Item was changed:
----- Method: Character>>veryDeepCopyWith: (in category 'copying') -----
veryDeepCopyWith: deepCopier
+ "Characters from 0 to 255 are unique, copy only the rest."
+
+ value < 256 ifTrue: [ ^self ].
+ ^super veryDeepCopyWith: deepCopier!
- "Return self. I can't be copied."!
More information about the Squeak-dev
mailing list
|