Colin Putney uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cwp.840.mcz
==================== Summary ====================
Name: Kernel-cwp.840
Author: cwp
Time: 22 March 2014, 7:55:47.589 pm
UUID: 29c07cf5-3bf7-4afd-95d3-b3db45892522
Ancestors: Kernel-nice.839
Rename EnvironmentRequest to CurrentEnvironment.
=============== Diff against Kernel-nice.839 ===============
Item was changed:
----- Method: ClassBuilder>>superclass:subclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: newSuper
subclass: 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."
| env |
+ env := CurrentEnvironment signal ifNil: [newSuper environment].
- env := EnvironmentRequest signal ifNil: [newSuper environment].
^self
name: t
inEnvironment: env
subclassOf: newSuper
type: newSuper typeOfClass
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
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 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].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: actualType
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Item was changed:
----- Method: ClassBuilder>>superclass:variableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: aClass
variableSubclass: 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 pointer variables."
| env |
aClass isBits ifTrue:
[^self error: 'cannot make a pointer subclass of a class with non-pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #variable
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 isPointers])
ifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #words
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Item was changed:
----- Method: ClassBuilder>>superclass:weakSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: aClass
weakSubclass: 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 weak indexable pointer variables."
| env |
aClass isBits
ifTrue: [^self error: 'cannot make a pointer subclass of a class with non-pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #weak
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Colin Putney uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cwp.840.mcz
==================== Summary ====================
Name: Kernel-cwp.840
Author: cwp
Time: 22 March 2014, 7:55:47.589 pm
UUID: 29c07cf5-3bf7-4afd-95d3-b3db45892522
Ancestors: Kernel-nice.839
Rename EnvironmentRequest to CurrentEnvironment.
=============== Diff against Kernel-nice.839 ===============
Item was changed:
----- Method: ClassBuilder>>superclass:subclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: newSuper
subclass: 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."
| env |
+ env := CurrentEnvironment signal ifNil: [newSuper environment].
- env := EnvironmentRequest signal ifNil: [newSuper environment].
^self
name: t
inEnvironment: env
subclassOf: newSuper
type: newSuper typeOfClass
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
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 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].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: actualType
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Item was changed:
----- Method: ClassBuilder>>superclass:variableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: aClass
variableSubclass: 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 pointer variables."
| env |
aClass isBits ifTrue:
[^self error: 'cannot make a pointer subclass of a class with non-pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #variable
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 isPointers])
ifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #words
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Item was changed:
----- Method: ClassBuilder>>superclass:weakSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: aClass
weakSubclass: 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 weak indexable pointer variables."
| env |
aClass isBits
ifTrue: [^self error: 'cannot make a pointer subclass of a class with non-pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #weak
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Colin Putney uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-cwp.840.mcz
==================== Summary ====================
Name: Kernel-cwp.840
Author: cwp
Time: 22 March 2014, 7:55:47.589 pm
UUID: 29c07cf5-3bf7-4afd-95d3-b3db45892522
Ancestors: Kernel-nice.839
Rename EnvironmentRequest to CurrentEnvironment.
=============== Diff against Kernel-nice.839 ===============
Item was changed:
----- Method: ClassBuilder>>superclass:subclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: newSuper
subclass: 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."
| env |
+ env := CurrentEnvironment signal ifNil: [newSuper environment].
- env := EnvironmentRequest signal ifNil: [newSuper environment].
^self
name: t
inEnvironment: env
subclassOf: newSuper
type: newSuper typeOfClass
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
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 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].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: actualType
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Item was changed:
----- Method: ClassBuilder>>superclass:variableSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: aClass
variableSubclass: 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 pointer variables."
| env |
aClass isBits ifTrue:
[^self error: 'cannot make a pointer subclass of a class with non-pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #variable
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 isPointers])
ifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #words
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Item was changed:
----- Method: ClassBuilder>>superclass:weakSubclass:instanceVariableNames:classVariableNames:poolDictionaries:category: (in category 'public') -----
superclass: aClass
weakSubclass: 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 weak indexable pointer variables."
| env |
aClass isBits
ifTrue: [^self error: 'cannot make a pointer subclass of a class with non-pointer fields'].
+ env := CurrentEnvironment signal ifNil: [aClass environment].
- env := EnvironmentRequest signal ifNil: [aClass environment].
^self
name: t
inEnvironment: env
subclassOf: aClass
type: #weak
instanceVariableNames: f
classVariableNames: d
poolDictionaries: s
category: cat!
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.264.mcz
==================== Summary ====================
Name: KernelTests-nice.264
Author: nice
Time: 21 March 2014, 6:40:48.635 pm
UUID: e99bef3c-6fa7-8d4f-b491-f9ef0f98ed63
Ancestors: KernelTests-nice.263
A non regression test for just found sqrtFloor bug.
=============== Diff against KernelTests-nice.263 ===============
Item was added:
+ ----- Method: LargePositiveIntegerTest>>testLargeSqrtFloor (in category 'tests') -----
+ testLargeSqrtFloor
+ "This test fails if a careless implementation naivly factors out the power of two (remove the trailing zeroes up to lowBit).
+ This was the case in a previous Squeak 4.x implementation."
+
+ | large root |
+ large := (SmallInteger maxVal << 100 + 1) << 100.
+ root := large sqrtFloor.
+ self assert: root squared <= large.
+ self assert: (root+1) squared > large.!
Nicolas Cellier uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-nice.264.mcz
==================== Summary ====================
Name: KernelTests-nice.264
Author: nice
Time: 21 March 2014, 6:40:48.635 pm
UUID: e99bef3c-6fa7-8d4f-b491-f9ef0f98ed63
Ancestors: KernelTests-nice.263
A non regression test for just found sqrtFloor bug.
=============== Diff against KernelTests-nice.263 ===============
Item was added:
+ ----- Method: LargePositiveIntegerTest>>testLargeSqrtFloor (in category 'tests') -----
+ testLargeSqrtFloor
+ "This test fails if a careless implementation naivly factors out the power of two (remove the trailing zeroes up to lowBit).
+ This was the case in a previous Squeak 4.x implementation."
+
+ | large root |
+ large := (SmallInteger maxVal << 100 + 1) << 100.
+ root := large sqrtFloor.
+ self assert: root squared <= large.
+ self assert: (root+1) squared > large.!