<div dir="ltr">Thanks for the heads up, Nicolas, I hadn't noticed. I'll merge asap.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 13, 2016 at 11:26 AM, Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Eliot,<br></div>did you see related changes in inbox?<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-10-12 21:10 GMT+02:00 <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Eliot Miranda uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-eem.1045.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk<wbr>/Kernel-eem.1045.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-eem.1045<br>
Author: eem<br>
Time: 12 October 2016, 12:10:33.006651 pm<br>
UUID: d91d38c6-bb5b-4fcd-a28b-1bdbc8<wbr>67a33e<br>
Ancestors: Kernel-nice.1044<br>
<br>
Add support for creating DoubleByte (isShorts) and DoubleWord (isLongs) variable classes.<br>
<br>
=============== Diff against Kernel-nice.1044 ===============<br>
<br>
Item was changed:<br>
----- Method: Behavior>>isBytes (in category 'testing') -----<br>
isBytes<br>
+ "Answer whether the receiver's instances have indexed 8-bit integer instance variables.<br>
- "Answer whether the receiver has 8-bit instance variables.<br>
Above Cog Spur the class format is<br>
<5 bits inst spec><16 bits inst size><br>
where the 5-bit inst spec is<br>
0 = 0 sized objects (UndefinedObject True False et al)<br>
1 = non-indexable objects with inst vars (Point et al)<br>
2 = indexable objects with no inst vars (Array et al)<br>
3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)<br>
4 = weak indexable objects with inst vars (WeakArray et al)<br>
5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)<br>
6 = unused<br>
7 = immediates (SmallInteger, Character)<br>
8 = unused<br>
9 = 64-bit indexable<br>
10-11 = 32-bit indexable (Bitmap)<br>
12-15 = 16-bit indexable<br>
16-23 = 8-bit indexable<br>
24-31 = compiled methods (CompiledMethod)"<br>
^self instSpec >= 16!<br>
<br>
Item was added:<br>
+ ----- Method: Behavior>>isLongs (in category 'testing') -----<br>
+ isLongs<br>
+ "Answer whether the receiver's instances have indexed 64-bit integer instance variables.<br>
+ Above Cog Spur the class format is<br>
+ <5 bits inst spec><16 bits inst size><br>
+ where the 5-bit inst spec is<br>
+ 0 = 0 sized objects (UndefinedObject True False et al)<br>
+ 1 = non-indexable objects with inst vars (Point et al)<br>
+ 2 = indexable objects with no inst vars (Array et al)<br>
+ 3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)<br>
+ 4 = weak indexable objects with inst vars (WeakArray et al)<br>
+ 5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)<br>
+ 6 = unused<br>
+ 7 = immediates (SmallInteger, Character)<br>
+ 8 = unused<br>
+ 9 = 64-bit indexable<br>
+ 10-11 = 32-bit indexable (Bitmap)<br>
+ 12-15 = 16-bit indexable<br>
+ 16-23 = 8-bit indexable<br>
+ 24-31 = compiled methods (CompiledMethod)"<br>
+ ^self instSpec = 9!<br>
<br>
Item was added:<br>
+ ----- Method: Behavior>>isShorts (in category 'testing') -----<br>
+ isShorts<br>
+ "Answer whether the receiver's instances have indexed 16-bit integer instance variables.<br>
+ Above Cog Spur the class format is<br>
+ <5 bits inst spec><16 bits inst size><br>
+ where the 5-bit inst spec is<br>
+ 0 = 0 sized objects (UndefinedObject True False et al)<br>
+ 1 = non-indexable objects with inst vars (Point et al)<br>
+ 2 = indexable objects with no inst vars (Array et al)<br>
+ 3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)<br>
+ 4 = weak indexable objects with inst vars (WeakArray et al)<br>
+ 5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)<br>
+ 6 = unused<br>
+ 7 = immediates (SmallInteger, Character)<br>
+ 8 = unused<br>
+ 9 = 64-bit indexable<br>
+ 10-11 = 32-bit indexable (Bitmap)<br>
+ 12-15 = 16-bit indexable<br>
+ 16-23 = 8-bit indexable<br>
+ 24-31 = compiled methods (CompiledMethod)"<br>
+ ^self instSpec = 12!<br>
<br>
Item was changed:<br>
----- Method: Behavior>>isWords (in category 'testing') -----<br>
isWords<br>
+ "Answer whether the receiver's instances have indexed 32-bit integer instance variables.<br>
+ Above Cog Spur the class format is<br>
+ <5 bits inst spec><16 bits inst size><br>
+ where the 5-bit inst spec is<br>
+ 0 = 0 sized objects (UndefinedObject True False et al)<br>
+ 1 = non-indexable objects with inst vars (Point et al)<br>
+ 2 = indexable objects with no inst vars (Array et al)<br>
+ 3 = indexable objects with inst vars (MethodContext AdditionalMethodState et al)<br>
+ 4 = weak indexable objects with inst vars (WeakArray et al)<br>
+ 5 = weak non-indexable objects with inst vars (ephemerons) (Ephemeron)<br>
+ 6 = unused<br>
+ 7 = immediates (SmallInteger, Character)<br>
+ 8 = unused<br>
+ 9 = 64-bit indexable<br>
+ 10-11 = 32-bit indexable (Bitmap)<br>
+ 12-15 = 16-bit indexable<br>
+ 16-23 = 8-bit indexable<br>
+ 24-31 = compiled methods (CompiledMethod)"<br>
+ ^self instSpec = 10!<br>
- "Answer true if the receiver is made of 32-bit instance variables."<br>
-<br>
- ^self isBytes not!<br>
<br>
Item was changed:<br>
----- Method: Class>>variableByteSubclass:in<wbr>stanceVariableNames:classVaria<wbr>bleNames:poolDictionaries:<wbr>category: (in category 'subclass creation') -----<br>
variableByteSubclass: t instanceVariableNames: f<br>
classVariableNames: d poolDictionaries: s category: cat<br>
"This is the standard initialization message for creating a new class as a<br>
subclass of an existing class (the receiver) in which the subclass is to<br>
+ have indexable 8-bit byte-sized nonpointer variables."<br>
+ ^ClassBuilder new<br>
- have indexable byte-sized nonpointer variables."<br>
- ^(ClassBuilder new)<br>
superclass: self<br>
variableByteSubclass: t<br>
instanceVariableNames: f<br>
classVariableNames: d<br>
poolDictionaries: s<br>
+ category: cat!<br>
- category: cat<br>
- !<br>
<br>
Item was changed:<br>
----- Method: Class>>variableByteSubclass:us<wbr>es:instanceVariableNames:class<wbr>VariableNames:poolDictionaries<wbr>:category: (in category 'subclass creation') -----<br>
variableByteSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f<br>
classVariableNames: d poolDictionaries: s category: cat<br>
"This is the standard initialization message for creating a new class as a<br>
subclass of an existing class (the receiver) in which the subclass is to<br>
+ have indexable 8-bit byte-sized nonpointer variables."<br>
- have indexable byte-sized nonpointer variables."<br>
<br>
| newClass copyOfOldClass |<br>
copyOfOldClass := self copy.<br>
newClass := self<br>
variableByteSubclass: t<br>
instanceVariableNames: f<br>
classVariableNames: d<br>
poolDictionaries: s<br>
category: cat.<br>
<br>
newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition.<br>
SystemChangeNotifier uniqueInstance<br>
classDefinitionChangedFrom: copyOfOldClass to: newClass.<br>
+ ^newClass!<br>
- ^newClass<br>
- !<br>
<br>
Item was added:<br>
+ ----- Method: Class>>variableDoubleByteSubcl<wbr>ass:instanceVariableNames:clas<wbr>sVariableNames:poolDictionarie<wbr>s:category: (in category 'subclass creation') -----<br>
+ variableDoubleByteSubclass: t instanceVariableNames: f<br>
+ classVariableNames: d poolDictionaries: s category: cat<br>
+ "This is the standard initialization message for creating a new class as a<br>
+ subclass of an existing class (the receiver) in which the subclass is to<br>
+ have indexable 16-bit double byte-sized nonpointer variables."<br>
+ ^ClassBuilder new<br>
+ superclass: self<br>
+ variableDoubleByteSubclass: t<br>
+ instanceVariableNames: f<br>
+ classVariableNames: d<br>
+ poolDictionaries: s<br>
+ category: cat!<br>
<br>
Item was added:<br>
+ ----- Method: Class>>variableDoubleByteSubcl<wbr>ass:uses:<wbr>instanceVariableNames:classVar<wbr>iableNames:poolDictionaries:<wbr>category: (in category 'subclass creation') -----<br>
+ variableDoubleByteSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f<br>
+ classVariableNames: d poolDictionaries: s category: cat<br>
+ "This is the standard initialization message for creating a new class as a<br>
+ subclass of an existing class (the receiver) in which the subclass is to<br>
+ have indexable 16-bit double byte-sized nonpointer variables."<br>
+<br>
+ | newClass copyOfOldClass |<br>
+ copyOfOldClass := self copy.<br>
+ newClass := self<br>
+ variableDoubleByteSubclass: t<br>
+ instanceVariableNames: f<br>
+ classVariableNames: d<br>
+ poolDictionaries: s<br>
+ category: cat.<br>
+<br>
+ newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition.<br>
+ SystemChangeNotifier uniqueInstance<br>
+ classDefinitionChangedFrom: copyOfOldClass to: newClass.<br>
+ ^newClass!<br>
<br>
Item was added:<br>
+ ----- Method: Class>>variableDoubleWordSubcl<wbr>ass:instanceVariableNames:clas<wbr>sVariableNames:poolDictionarie<wbr>s:category: (in category 'subclass creation') -----<br>
+ variableDoubleWordSubclass: t instanceVariableNames: f<br>
+ classVariableNames: d poolDictionaries: s category: cat<br>
+ "This is the standard initialization message for creating a new class as a<br>
+ subclass of an existing class (the receiver) in which the subclass is to<br>
+ have indexable 64-bit word-sized nonpointer variables."<br>
+ ^ClassBuilder new<br>
+ superclass: self<br>
+ variableDoubleWordSubclass: t<br>
+ instanceVariableNames: f<br>
+ classVariableNames: d<br>
+ poolDictionaries: s<br>
+ category: cat!<br>
<br>
Item was added:<br>
+ ----- Method: Class>>variableDoubleWordSubcl<wbr>ass:uses:<wbr>instanceVariableNames:classVar<wbr>iableNames:poolDictionaries:<wbr>category: (in category 'subclass creation') -----<br>
+ variableDoubleWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f<br>
+ classVariableNames: d poolDictionaries: s category: cat<br>
+ "This is the standard initialization message for creating a new class as a<br>
+ subclass of an existing class (the receiver) in which the subclass is to<br>
+ have indexable 64-bit word-sized nonpointer variables."<br>
+<br>
+ | newClass copyOfOldClass |<br>
+ copyOfOldClass := self copy.<br>
+ newClass := self<br>
+ variableDoubleWordSubclass: t<br>
+ instanceVariableNames: f<br>
+ classVariableNames: d<br>
+ poolDictionaries: s<br>
+ category: cat.<br>
+<br>
+ newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition.<br>
+ SystemChangeNotifier uniqueInstance<br>
+ classDefinitionChangedFrom: copyOfOldClass to: newClass.<br>
+ ^newClass!<br>
<br>
Item was changed:<br>
----- Method: Class>>variableWordSubclass:in<wbr>stanceVariableNames:classVaria<wbr>bleNames:poolDictionaries:<wbr>category: (in category 'subclass creation') -----<br>
variableWordSubclass: t instanceVariableNames: f<br>
classVariableNames: d poolDictionaries: s category: cat<br>
"This is the standard initialization message for creating a new class as a<br>
subclass of an existing class (the receiver) in which the subclass is to<br>
+ have indexable 32-bit word-sized nonpointer variables."<br>
+ ^ClassBuilder new<br>
- have indexable word-sized nonpointer variables."<br>
- ^(ClassBuilder new)<br>
superclass: self<br>
variableWordSubclass: t<br>
instanceVariableNames: f<br>
classVariableNames: d<br>
poolDictionaries: s<br>
+ category: cat!<br>
- category: cat<br>
- !<br>
<br>
Item was changed:<br>
----- Method: Class>>variableWordSubclass:us<wbr>es:instanceVariableNames:class<wbr>VariableNames:poolDictionaries<wbr>:category: (in category 'subclass creation') -----<br>
variableWordSubclass: t uses: aTraitCompositionOrArray instanceVariableNames: f<br>
classVariableNames: d poolDictionaries: s category: cat<br>
"This is the standard initialization message for creating a new class as a<br>
subclass of an existing class (the receiver) in which the subclass is to<br>
+ have indexable 32-bit word-sized nonpointer variables."<br>
- have indexable word-sized nonpointer variables."<br>
<br>
| newClass copyOfOldClass |<br>
copyOfOldClass := self copy.<br>
newClass := self<br>
variableWordSubclass: t<br>
instanceVariableNames: f<br>
classVariableNames: d<br>
poolDictionaries: s<br>
category: cat.<br>
<br>
newClass setTraitComposition: aTraitCompositionOrArray asTraitComposition.<br>
SystemChangeNotifier uniqueInstance<br>
classDefinitionChangedFrom: copyOfOldClass to: newClass.<br>
+ ^newClass !<br>
- ^newClass<br>
- !<br>
<br>
Item was changed:<br>
----- Method: ClassBuilder>>superclass:varia<wbr>bleByteSubclass:instanceVariab<wbr>leNames:classVariableNames:poo<wbr>lDictionaries:category: (in category 'public') -----<br>
superclass: aClass<br>
+ variableByteSubclass: t instanceVariableNames: f<br>
- variableByteSubclass: t instanceVariableNames: f<br>
classVariableNames: d poolDictionaries: s category: cat<br>
+ "This is the standard initialization message for creating a new class as a subclass of an<br>
+ existing class in which the subclass is to have indexable 8-bit byte-sized nonpointer variables."<br>
- "This is the standard initialization message for creating a new class as a<br>
- subclass of an existing class in which the subclass is to<br>
- have indexable byte-sized nonpointer variables."<br>
| oldClassOrNil actualType env |<br>
+ aClass instSize > 0<br>
- (aClass instSize > 0)<br>
ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields'].<br>
+ (aClass isVariable and: [aClass isBytes not])<br>
+ ifTrue: [^self error: 'cannot make an 8-bit byte subclass of a class with 16, 32 or 64 bit fields'].<br>
- (aClass isVariable and: [aClass isWords])<br>
- ifTrue: [^self error: 'cannot make a byte subclass of a class with word fields'].<br>
(aClass isVariable and: [aClass isPointers])<br>
ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields'].<br>
oldClassOrNil := aClass environment at: t ifAbsent:[nil].<br>
actualType := (oldClassOrNil notNil<br>
and: [oldClassOrNil typeOfClass == #compiledMethod])<br>
ifTrue: [#compiledMethod]<br>
ifFalse: [#bytes].<br>
env := CurrentEnvironment signal ifNil: [aClass environment].<br>
^self<br>
name: t<br>
inEnvironment: env<br>
subclassOf: aClass<br>
type: actualType<br>
instanceVariableNames: f<br>
classVariableNames: d<br>
poolDictionaries: s<br>
category: cat!<br>
<br>
Item was added:<br>
+ ----- Method: ClassBuilder>>superclass:varia<wbr>bleDoubleByteSubclass:instance<wbr>VariableNames:classVariableNam<wbr>es:poolDictionaries:category: (in category 'public') -----<br>
+ superclass: aClass<br>
+ variableDoubleByteSubclass: t instanceVariableNames: f<br>
+ classVariableNames: d poolDictionaries: s category: cat<br>
+ "This is the standard initialization message for creating a new class as a subclass of an<br>
+ existing class in which the subclass is to have indexable 16-bit-sized nonpointer variables."<br>
+ | oldClassOrNil env |<br>
+ aClass instSize > 0<br>
+ ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields'].<br>
+ (aClass isVariable and: [aClass isShorts not])<br>
+ ifTrue: [^self error: 'cannot make a 16-bit short subclass of a class with 8, 32 or 64 bit fields'].<br>
+ (aClass isVariable and: [aClass isPointers])<br>
+ ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields'].<br>
+ oldClassOrNil := aClass environment at: t ifAbsent:[nil].<br>
+ env := CurrentEnvironment signal ifNil: [aClass environment].<br>
+ ^self<br>
+ name: t<br>
+ inEnvironment: env<br>
+ subclassOf: aClass<br>
+ type: #shorts<br>
+ instanceVariableNames: f<br>
+ classVariableNames: d<br>
+ poolDictionaries: s<br>
+ category: cat!<br>
<br>
Item was added:<br>
+ ----- Method: ClassBuilder>>superclass:varia<wbr>bleDoubleWordSubclass:instance<wbr>VariableNames:classVariableNam<wbr>es:poolDictionaries:category: (in category 'public') -----<br>
+ superclass: aClass<br>
+ variableDoubleWordSubclass: t instanceVariableNames: f<br>
+ classVariableNames: d poolDictionaries: s category: cat<br>
+ "This is the standard initialization message for creating a new class as a subclass of an<br>
+ existing class in which the subclass is to have indexable 16-bit-sized nonpointer variables."<br>
+ | oldClassOrNil env |<br>
+ aClass instSize > 0<br>
+ ifTrue: [^self error: 'cannot make a byte subclass of a class with named fields'].<br>
+ (aClass isVariable and: [aClass isLongs not])<br>
+ ifTrue: [^self error: 'cannot make a 64-bit long subclass of a class with 8, 16 or 32 bit fields'].<br>
+ (aClass isVariable and: [aClass isPointers])<br>
+ ifTrue: [^self error: 'cannot make a byte subclass of a class with pointer fields'].<br>
+ oldClassOrNil := aClass environment at: t ifAbsent:[nil].<br>
+ env := CurrentEnvironment signal ifNil: [aClass environment].<br>
+ ^self<br>
+ name: t<br>
+ inEnvironment: env<br>
+ subclassOf: aClass<br>
+ type: #longs<br>
+ instanceVariableNames: f<br>
+ classVariableNames: d<br>
+ poolDictionaries: s<br>
+ category: cat!<br>
<br>
Item was changed:<br>
----- Method: ClassBuilder>>superclass:varia<wbr>bleWordSubclass:instanceVariab<wbr>leNames:classVariableNames:poo<wbr>lDictionaries:category: (in category 'public') -----<br>
superclass: aClass<br>
variableWordSubclass: t instanceVariableNames: f<br>
classVariableNames: d poolDictionaries: s category: cat<br>
+ "This is the standard initialization message for creating a new class as a subclass of an<br>
+ existing class in which the subclass is to have indexable 32-bit word-sized nonpointer variables."<br>
- "This is the standard initialization message for creating a new class as a<br>
- subclass of an existing class in which the subclass is to<br>
- have indexable word-sized nonpointer variables."<br>
| env |<br>
+ aClass instSize > 0<br>
- (aClass instSize > 0)<br>
ifTrue: [^self error: 'cannot make a word subclass of a class with named fields'].<br>
+ (aClass isVariable and: [aClass isWords not])<br>
+ ifTrue: [^self error: 'cannot make a 32-bit word subclass of a class with 8, 16 or 64 bit fields'].<br>
- (aClass isVariable and: [aClass isBytes])<br>
- ifTrue: [^self error: 'cannot make a word subclass of a class with byte fields'].<br>
(aClass isVariable and: [aClass isPointers])<br>
ifTrue: [^self error: 'cannot make a word subclass of a class with pointer fields'].<br>
env := CurrentEnvironment signal ifNil: [aClass environment].<br>
^self<br>
name: t<br>
inEnvironment: env<br>
subclassOf: aClass<br>
type: #words<br>
instanceVariableNames: f<br>
classVariableNames: d<br>
poolDictionaries: s<br>
category: cat!<br>
<br>
<br>
</blockquote></div><br></div>
</div></div><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div>