[squeak-dev] The Trunk: Collections-ul.463.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Oct 5 08:44:12 UTC 2011
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.463.mcz
==================== Summary ====================
Name: Collections-ul.463
Author: ul
Time: 4 October 2011, 8:25:51.321 pm
UUID: 2dda520b-035d-8a40-b62b-c285552d07ee
Ancestors: Collections-eem.462
- use #becomeForward: instead of #become:
=============== Diff against Collections-eem.462 ===============
Item was changed:
----- Method: CharacterSet>>add: (in category 'collection ops') -----
add: aCharacter
"I automatically become a WideCharacterSet if you add a wide character to myself"
aCharacter asciiValue >= 256
ifTrue: [| wide |
wide := WideCharacterSet new.
wide addAll: self.
wide add: aCharacter.
+ self becomeForward: wide.
- self become: wide.
^aCharacter].
map at: aCharacter asciiValue + 1 put: 1.
^aCharacter!
Item was changed:
----- Method: CharacterSetComplement>>removeAll (in category 'collection ops') -----
removeAll
+
+ self becomeForward: CharacterSet new!
- | newSet |
- newSet := CharacterSet new.
- self become: newSet!
Item was changed:
----- Method: LookupKey>>beBindingOfType:announcing: (in category 'bindings') -----
beBindingOfType: aClass announcing: aBool
"Make the receiver a global binding of the given type"
+
- | old new |
(Smalltalk globals associationAt: self key) == self
ifFalse:[^self error:'Not a global variable binding'].
self class == aClass ifTrue:[^self].
+ self becomeForward: (aClass key: self key value: self value).
- old := self.
- new := aClass key: self key value: self value.
- old become: new.
"NOTE: Now self == read-only (e.g., the new binding)"
^self recompileBindingsAnnouncing: aBool!
More information about the Squeak-dev
mailing list
|