Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/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."!
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/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."!
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.576.mcz
==================== Summary ====================
Name: Kernel-ul.576
Author: ul
Time: 30 April 2011, 3:48:56.834 am
UUID: 46b435fa-0bc5-954d-8b1b-37a9e581c85a
Ancestors: Kernel-ul.574
- documented the issues with Behavior >> #commentsIn:
- remove SortedCollection (mis)usage from #allSubclassesWithLevelDo:startingLevel:
=============== Diff against Kernel-ul.574 ===============
Item was changed:
----- Method: Behavior>>allSubclassesWithLevelDo:startingLevel: (in category 'accessing class hierarchy') -----
allSubclassesWithLevelDo: classAndLevelBlock startingLevel: level
"Walk the tree of subclasses, giving the class and its level"
+
- | subclassNames |
classAndLevelBlock value: self value: level.
self == Class ifTrue: [^ self]. "Don't visit all the metaclasses"
"Visit subclasses in alphabetical order"
+ self subclasses
+ sort: [ :a :b | a name <= b name ];
+ do: [ :subclass |
+ subclass
+ allSubclassesWithLevelDo: classAndLevelBlock
+ startingLevel: level + 1 ]!
- subclassNames := SortedCollection new.
- self subclassesDo: [:subC | subclassNames add: subC name].
- subclassNames do:
- [:name | (self environment at: name)
- allSubclassesWithLevelDo: classAndLevelBlock
- startingLevel: level+1]!
Item was changed:
----- Method: Behavior>>commentsIn: (in category 'accessing method dictionary') -----
commentsIn: sourceString
+ "Return the comments as a collection of strings in sourceString. This method along with #nextQuotePosIn:startingFrom: is wrong, because it assumes that all double quote characters are comment delimiters, but even this method has a double quote which is not part of any method comment. Also this method has nothing to do with the Behavior itself. Probably CompiledMethod is the best place for this."
-
| commentStart nextQuotePos someComments aPos |
+ (sourceString includes: $") ifFalse: [^#()].
- ('*"*' match: sourceString) ifFalse: [^#()].
someComments:= OrderedCollection new.
- sourceString size = 0 ifTrue: [^ someComments].
aPos:=1.
nextQuotePos:= 0.
[commentStart := sourceString findString: '"' startingAt: aPos.
nextQuotePos:= self nextQuotePosIn: sourceString startingFrom: commentStart.
(commentStart ~= 0 and: [nextQuotePos >commentStart])] whileTrue: [
commentStart ~= nextQuotePos ifTrue: [
someComments add: ((sourceString copyFrom: commentStart + 1 to: nextQuotePos - 1) copyReplaceAll: '""' with: '"').].
aPos := nextQuotePos+1].
^someComments!
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.576.mcz
==================== Summary ====================
Name: Kernel-ul.576
Author: ul
Time: 30 April 2011, 3:48:56.834 am
UUID: 46b435fa-0bc5-954d-8b1b-37a9e581c85a
Ancestors: Kernel-ul.574
- documented the issues with Behavior >> #commentsIn:
- remove SortedCollection (mis)usage from #allSubclassesWithLevelDo:startingLevel:
=============== Diff against Kernel-ul.574 ===============
Item was changed:
----- Method: Behavior>>allSubclassesWithLevelDo:startingLevel: (in category 'accessing class hierarchy') -----
allSubclassesWithLevelDo: classAndLevelBlock startingLevel: level
"Walk the tree of subclasses, giving the class and its level"
+
- | subclassNames |
classAndLevelBlock value: self value: level.
self == Class ifTrue: [^ self]. "Don't visit all the metaclasses"
"Visit subclasses in alphabetical order"
+ self subclasses
+ sort: [ :a :b | a name <= b name ];
+ do: [ :subclass |
+ subclass
+ allSubclassesWithLevelDo: classAndLevelBlock
+ startingLevel: level + 1 ]!
- subclassNames := SortedCollection new.
- self subclassesDo: [:subC | subclassNames add: subC name].
- subclassNames do:
- [:name | (self environment at: name)
- allSubclassesWithLevelDo: classAndLevelBlock
- startingLevel: level+1]!
Item was changed:
----- Method: Behavior>>commentsIn: (in category 'accessing method dictionary') -----
commentsIn: sourceString
+ "Return the comments as a collection of strings in sourceString. This method along with #nextQuotePosIn:startingFrom: is wrong, because it assumes that all double quote characters are comment delimiters, but even this method has a double quote which is not part of any method comment. Also this method has nothing to do with the Behavior itself. Probably CompiledMethod is the best place for this."
-
| commentStart nextQuotePos someComments aPos |
+ (sourceString includes: $") ifFalse: [^#()].
- ('*"*' match: sourceString) ifFalse: [^#()].
someComments:= OrderedCollection new.
- sourceString size = 0 ifTrue: [^ someComments].
aPos:=1.
nextQuotePos:= 0.
[commentStart := sourceString findString: '"' startingAt: aPos.
nextQuotePos:= self nextQuotePosIn: sourceString startingFrom: commentStart.
(commentStart ~= 0 and: [nextQuotePos >commentStart])] whileTrue: [
commentStart ~= nextQuotePos ifTrue: [
someComments add: ((sourceString copyFrom: commentStart + 1 to: nextQuotePos - 1) copyReplaceAll: '""' with: '"').].
aPos := nextQuotePos+1].
^someComments!
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.576.mcz
==================== Summary ====================
Name: Kernel-ul.576
Author: ul
Time: 30 April 2011, 3:48:56.834 am
UUID: 46b435fa-0bc5-954d-8b1b-37a9e581c85a
Ancestors: Kernel-ul.574
- documented the issues with Behavior >> #commentsIn:
- remove SortedCollection (mis)usage from #allSubclassesWithLevelDo:startingLevel:
=============== Diff against Kernel-ul.574 ===============
Item was changed:
----- Method: Behavior>>allSubclassesWithLevelDo:startingLevel: (in category 'accessing class hierarchy') -----
allSubclassesWithLevelDo: classAndLevelBlock startingLevel: level
"Walk the tree of subclasses, giving the class and its level"
+
- | subclassNames |
classAndLevelBlock value: self value: level.
self == Class ifTrue: [^ self]. "Don't visit all the metaclasses"
"Visit subclasses in alphabetical order"
+ self subclasses
+ sort: [ :a :b | a name <= b name ];
+ do: [ :subclass |
+ subclass
+ allSubclassesWithLevelDo: classAndLevelBlock
+ startingLevel: level + 1 ]!
- subclassNames := SortedCollection new.
- self subclassesDo: [:subC | subclassNames add: subC name].
- subclassNames do:
- [:name | (self environment at: name)
- allSubclassesWithLevelDo: classAndLevelBlock
- startingLevel: level+1]!
Item was changed:
----- Method: Behavior>>commentsIn: (in category 'accessing method dictionary') -----
commentsIn: sourceString
+ "Return the comments as a collection of strings in sourceString. This method along with #nextQuotePosIn:startingFrom: is wrong, because it assumes that all double quote characters are comment delimiters, but even this method has a double quote which is not part of any method comment. Also this method has nothing to do with the Behavior itself. Probably CompiledMethod is the best place for this."
-
| commentStart nextQuotePos someComments aPos |
+ (sourceString includes: $") ifFalse: [^#()].
- ('*"*' match: sourceString) ifFalse: [^#()].
someComments:= OrderedCollection new.
- sourceString size = 0 ifTrue: [^ someComments].
aPos:=1.
nextQuotePos:= 0.
[commentStart := sourceString findString: '"' startingAt: aPos.
nextQuotePos:= self nextQuotePosIn: sourceString startingFrom: commentStart.
(commentStart ~= 0 and: [nextQuotePos >commentStart])] whileTrue: [
commentStart ~= nextQuotePos ifTrue: [
someComments add: ((sourceString copyFrom: commentStart + 1 to: nextQuotePos - 1) copyReplaceAll: '""' with: '"').].
aPos := nextQuotePos+1].
^someComments!
Matthew Fulmer uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mtf.432.mcz
==================== Summary ====================
Name: System-mtf.432
Author: mtf
Time: 27 April 2011, 7:17:53.737 pm
UUID: c54be34c-bb06-4f94-9bc0-fb8e8616027a
Ancestors: System-ul.431
added SmalltalkImage>>dumpException:to: as a convenience for dumping an exception to a file
=============== Diff against System-ul.431 ===============
Item was added:
+ ----- Method: SmalltalkImage>>dumpException:to: (in category 'miscellaneous') -----
+ dumpException: ex to: aFilename
+
+ self
+ logError: ex description
+ inContext: ex signalerContext
+ to: aFilename
+ !
Matthew Fulmer uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mtf.432.mcz
==================== Summary ====================
Name: System-mtf.432
Author: mtf
Time: 27 April 2011, 7:17:53.737 pm
UUID: c54be34c-bb06-4f94-9bc0-fb8e8616027a
Ancestors: System-ul.431
added SmalltalkImage>>dumpException:to: as a convenience for dumping an exception to a file
=============== Diff against System-ul.431 ===============
Item was added:
+ ----- Method: SmalltalkImage>>dumpException:to: (in category 'miscellaneous') -----
+ dumpException: ex to: aFilename
+
+ self
+ logError: ex description
+ inContext: ex signalerContext
+ to: aFilename
+ !