Nicolas Cellier uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-nice.270.mcz
==================== Summary ====================
Name: CollectionsTests-nice.270
Author: nice
Time: 20 October 2016, 10:31:45.375142 pm
UUID: d2833ae6-3419-4cf0-b2af-12ee49046e20
Ancestors: CollectionsTests-nice.269
Test Interval reversed and sum
=============== Diff against CollectionsTests-nice.269 ===============
Item was added:
+ ----- Method: IntervalTest>>testReversed (in category 'tests') -----
+ testReversed
+ self assert: (3 to: 10) reversed = (10 to: 3 by: -1).
+ self assert: (3 to: 11 by: 4) reversed = (11 to: 3 by: -4).
+ self assert: (3 to: 12 by: 4) reversed = (11 to: 3 by: -4).!
Item was added:
+ ----- Method: IntervalTest>>testReversedEmpty (in category 'tests') -----
+ testReversedEmpty
+ self assert: (4 to: 3) reversed = (3 to: 4 by: -1).
+ self assert: (4 to: 3 by: 5) reversed = (3 to: 4 by: -5).!
Item was added:
+ ----- Method: IntervalTest>>testSum (in category 'tests') -----
+ testSum
+ 1 to: 10 do: [:i |
+ | int |
+ int := -3 to: i-1*5-3 by: 5.
+ self assert: int asArray sum = int sum.
+ self assert: int reversed sum = int sum]!
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.719.mcz
==================== Summary ====================
Name: Collections-nice.719
Author: nice
Time: 20 October 2016, 10:28:18.384751 pm
UUID: a873d200-0ee0-4297-aebd-510f92ea243c
Ancestors: Collections-nice.718
Let reversed preserve Interval class.
Handle the case of empty Interval specially (preserve the bounds).
=============== Diff against Collections-nice.718 ===============
Item was added:
+ ----- Method: Interval>>reversed (in category 'converting') -----
+ reversed
+ self isEmpty ifTrue: [^stop to: start by: step negated].
+ ^self last to: start by: step negated!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1047.mcz
==================== Summary ====================
Name: Kernel-nice.1047
Author: nice
Time: 20 October 2016, 10:07:24.06516 pm
UUID: a8f40d9d-7e18-4ae4-99ce-a3144357602d
Ancestors: Kernel-tfel.1046, Kernel-nice.1041
Merge nice.1041 changes for 16/64 bits integer array
By now all changes are superseded by Eliot's
HalfWord -> DoubleByte
isHalfWords -> isShorts
isDoubleWords -> isLongs
=============== Diff against Kernel-tfel.1046 ===============
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1041.mcz
==================== Summary ====================
Name: Kernel-nice.1041
Author: nice
Time: 21 September 2016, 9:06:09.983013 pm
UUID: 80f9f68f-fad8-42d7-b1bc-bfa1ee876629
Ancestors: Kernel-nice.1040
The last bits of intSpec are zero, so no need to mask it.
Those bits are used in instances only - see intSpec comment.
=============== Diff against Kernel-nice.1040 ===============
Item was changed:
----- Method: Behavior>>isHalfWords (in category 'testing') -----
isHalfWords
"Answer true if the receiver is made of 16-bit instance variables."
+ ^self instSpec = 2r1100!
- ^(self instSpec bitAnd: 2r11100) = 2r1100!
Item was changed:
----- Method: Behavior>>isWords (in category 'testing') -----
isWords
"Answer true if the receiver is made of 32-bit instance variables."
+ ^self instSpec = 2r1010!
- ^(self instSpec bitAnd: 2r11110) = 2r1010!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1039.mcz
==================== Summary ====================
Name: Kernel-nice.1039
Author: nice
Time: 20 September 2016, 11:00:27.302558 pm
UUID: b0aeabf6-f73d-44c4-be8b-d2c66a73486f
Ancestors: Kernel-bf.1038
Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which are possible in Spur format, but yet not exploited.
=============== Diff against Kernel-bf.1038 ===============
Item was added:
+ ----- Method: Behavior>>isDoubleWords (in category 'testing') -----
+ isDoubleWords
+ "Answer true if the receiver is made of 64-bit instance variables."
+
+ ^self instSpec = 2r1001!
Item was added:
+ ----- Method: Behavior>>isHalfWords (in category 'testing') -----
+ isHalfWords
+ "Answer true if the receiver is made of 16-bit instance variables."
+
+ ^(self instSpec bitAnd: 2r11100) = 2r1100!
Item was changed:
----- Method: Behavior>>isWords (in category 'testing') -----
isWords
"Answer true if the receiver is made of 32-bit instance variables."
+ ^(self instSpec bitAnd: 2r11110) = 2r1010!
- ^self isBytes not!
Item was added:
+ ----- Method: Class>>variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') -----
+ variableDoubleWordSubclass: t instanceVariableNames: f
+ classVariableNames: d poolDictionaries: s category: cat
+ "This is the standard initialization message for creating a new class as a
+ subclass of an existing class (the receiver) in which the subclass is to
+ have indexable double-word-sized nonpointer variables."
+ ^(ClassBuilder new)
+ superclass: self
+ variableDoubleWordSubclass: t
+ instanceVariableNames: f
+ classVariableNames: d
+ poolDictionaries: s
+ category: cat
+ !
Item was added:
+ ----- Method: Class>>variableDoubleWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') -----
+ variableDoubleWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f
+ classVariableNames: d poolDictionaries: s category: cat
+ "This is the standard initialization message for creating a new class as a
+ subclass of an existing class (the receiver) in which the subclass is to
+ have indexable double-word-sized nonpointer variables."
+
+ | newClass copyOfOldClass |
+ copyOfOldClass := self copy.
+ newClass := self
+ variableDoubleWordSubclass: t
+ instanceVariableNames: f
+ classVariableNames: d
+ poolDictionaries: s
+ category: cat.
+
+ newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition.
+ SystemChangeNotifier uniqueInstance
+ classDefinitionChangedFrom: copyOfOldClass to: newClass.
+ ^newClass
+ !
Item was added:
+ ----- Method: Class>>variableHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') -----
+ variableHalfWordSubclass: t instanceVariableNames: f
+ classVariableNames: d poolDictionaries: s category: cat
+ "This is the standard initialization message for creating a new class as a
+ subclass of an existing class (the receiver) in which the subclass is to
+ have indexable half-word-sized nonpointer variables."
+ ^(ClassBuilder new)
+ superclass: self
+ variableHalfWordSubclass: t
+ instanceVariableNames: f
+ classVariableNames: d
+ poolDictionaries: s
+ category: cat
+ !
Item was added:
+ ----- Method: Class>>variableHalfWordSubclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'subclass creation') -----
+ variableHalfWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f
+ classVariableNames: d poolDictionaries: s category: cat
+ "This is the standard initialization message for creating a new class as a
+ subclass of an existing class (the receiver) in which the subclass is to
+ have indexable half-word-sized nonpointer variables."
+
+ | newClass copyOfOldClass |
+ copyOfOldClass := self copy.
+ newClass := self
+ variableHalfWordSubclass: t
+ instanceVariableNames: f
+ classVariableNames: d
+ poolDictionaries: s
+ category: cat.
+
+ newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition.
+ SystemChangeNotifier uniqueInstance
+ classDefinitionChangedFrom: copyOfOldClass to: newClass.
+ ^newClass!
Item was changed:
----- Method: ClassBuilder>>superclass:variableByteSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: aClass
variableByteSubclass: t instanceVariableNames: f
classVariableNames: d poolDictionaries: s category: cat
"This is the standard initialization message for creating a new class as a
subclass of an existing class in which the subclass is to
have indexable byte-sized nonpointer variables."
| oldClassOrNil actualType env |
(aClass instSize > 0)
ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields'].
(aClass isVariable and: [aClass isWords])
ifTrue: [^self error: 'cannot make a byte subclass of a class with word fields'].
+ (aClass isVariable and: [aClass isHalfWords])
+ ifTrue: [^self error: 'cannot make a byte subclass of a class with half word fields'].
+ (aClass isVariable and: [aClass isDoubleWords])
+ ifTrue: [^self error: 'cannot make a byte subclass of a class with double word fields'].
(aClass isVariable and: [aClass isPointers])
ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields'].
oldClassOrNil := aClass environment at: t ifAbsent:[nil].
actualType := (oldClassOrNil notNil
and: [oldClassOrNil typeOfClass == #compiledMethod])
ifTrue: [#compiledMethod]
ifFalse: [#bytes].
env := CurrentEnvironment signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: actualType
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Item was added:
+ ----- Method: ClassBuilder>>superclass:variableDoubleWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
+ superclass: aClass
+ variableDoubleWordSubclass: t instanceVariableNames: f
+ classVariableNames: d poolDictionaries: s category: cat
+ "This is the standard initialization message for creating a new class as a
+ subclass of an existing class in which the subclass is to
+ have indexable double-word-sized nonpointer variables."
+ | env |
+ (aClass instSize > 0)
+ ifTrue: [^self error: 'cannot make a double word subclass of a class with named fields'].
+ (aClass isVariable and: [aClass isBytes])
+ ifTrue: [^self error: 'cannot make a double word subclass of a class with byte fields'].
+ (aClass isVariable and: [aClass isHalfWords])
+ ifTrue: [^self error: 'cannot make a double word subclass of a class with half word fields'].
+ (aClass isVariable and: [aClass isWords])
+ ifTrue: [^self error: 'cannot make a double word subclass of a class with word fields'].
+ (aClass isVariable and: [aClass isPointers])
+ ifTrue: [^self error: 'cannot make a double word subclass of a class with pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
+ ^self
+ name: t
+ inEnvironment: env
+ subclassOf: aClass
+ type: #longs
+ instanceVariableNames: f
+ classVariableNames: d
+ poolDictionaries: s
+ category: cat!
Item was added:
+ ----- Method: ClassBuilder>>superclass:variableHalfWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
+ superclass: aClass
+ variableHalfWordSubclass: t instanceVariableNames: f
+ classVariableNames: d poolDictionaries: s category: cat
+ "This is the standard initialization message for creating a new class as a
+ subclass of an existing class in which the subclass is to
+ have indexable half-word-sized nonpointer variables."
+ | env |
+ (aClass instSize > 0)
+ ifTrue: [^self error: 'cannot make a half word subclass of a class with named fields'].
+ (aClass isVariable and: [aClass isBytes])
+ ifTrue: [^self error: 'cannot make a half word subclass of a class with byte fields'].
+ (aClass isVariable and: [aClass isWords])
+ ifTrue: [^self error: 'cannot make a half word subclass of a class with word fields'].
+ (aClass isVariable and: [aClass isDoubleWords])
+ ifTrue: [^self error: 'cannot make a half word subclass of a class with double word fields'].
+ (aClass isVariable and: [aClass isPointers])
+ ifTrue: [^self error: 'cannot make a half word subclass of a class with pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
+ ^self
+ name: t
+ inEnvironment: env
+ subclassOf: aClass
+ type: #shorts
+ instanceVariableNames: f
+ classVariableNames: d
+ poolDictionaries: s
+ category: cat!
Item was changed:
----- Method: ClassBuilder>>superclass:variableWordSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: aClass
variableWordSubclass: t instanceVariableNames: f
classVariableNames: d poolDictionaries: s category: cat
"This is the standard initialization message for creating a new class as a
subclass of an existing class in which the subclass is to
have indexable word-sized nonpointer variables."
| env |
(aClass instSize > 0)
ifTrue: [^self error: 'cannot make a word subclass of a class with named fields'].
(aClass isVariable and: [aClass isBytes])
ifTrue: [^self error: 'cannot make a word subclass of a class with byte fields'].
+ (aClass isVariable and: [aClass isHalfWords])
+ ifTrue: [^self error: 'cannot make a word subclass of a class with half word fields'].
+ (aClass isVariable and: [aClass isDoubleWords])
+ ifTrue: [^self error: 'cannot make a word subclass of a class with double word fields'].
(aClass isVariable and: [aClass isPointers])
ifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields'].
env := CurrentEnvironment signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #words
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!