<div dir="ltr"><div>Hi Eliot,<br></div><div>I don't remember about this conversation. Anyway I was on the process of adopting DoubleByte, so this was only transitory.<br></div><div>I perfectly agree about Words... Even without quitting own Squeak world this is already highly polymorphic:<br>There are virtual machine words (sizeof void *)<br>There are image words (sizeof Oop)<br>Above two matches on Cog & Spur VM, but as you said 32bits image on 64bits image could be interesting.<br>There are variableWord collections (allways 32bits) and now variableDoubleWords...<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-20 22:10 GMT+02:00 Eliot Miranda <span dir="ltr"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Nicolas,<div><br></div><div> I thought that there had been a conversation about this and that Bert had expressed a preference for DoubleByte and DoubleWord. Hence I kept to that. If I'm mistaken forgive me. But personally I don't like HalfWord. t's as ambiguous as word. At least DoubleByte is not ambiguous.</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Thu, Oct 20, 2016 at 12:59 PM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nicolas Cellier uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-nice.1039.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk<wbr>/Kernel-nice.1039.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-nice.1039<br>
Author: nice<br>
Time: 20 September 2016, 11:00:27.302558 pm<br>
UUID: b0aeabf6-f73d-44c4-be8b-d2c66a<wbr>73486f<br>
Ancestors: Kernel-bf.1038<br>
<br>
Introduce HalfWord (16 bits) and DoubleWord (64 bits) subclasses which are possible in Spur format, but yet not exploited.<br>
<br>
=============== Diff against Kernel-bf.1038 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Behavior>>isDoubleWords (in category 'testing') -----<br>
+ isDoubleWords<br>
+ "Answer true if the receiver is made of 64-bit instance variables."<br>
+<br>
+ ^self instSpec = 2r1001!<br>
<br>
Item was added:<br>
+ ----- Method: Behavior>>isHalfWords (in category 'testing') -----<br>
+ isHalfWords<br>
+ "Answer true if the receiver is made of 16-bit instance variables."<br>
+<br>
+ ^(self instSpec bitAnd: 2r11100) = 2r1100!<br>
<br>
Item was changed:<br>
----- Method: Behavior>>isWords (in category 'testing') -----<br>
isWords<br>
"Answer true if the receiver is made of 32-bit instance variables."<br>
<br>
+ ^(self instSpec bitAnd: 2r11110) = 2r1010!<br>
- ^self isBytes not!<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 double-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>
<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 double-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>
<br>
Item was added:<br>
+ ----- Method: Class>>variableHalfWordSubclas<wbr>s:instanceVariableNames:classV<wbr>ariableNames:poolDictionaries:<wbr>category: (in category 'subclass creation') -----<br>
+ variableHalfWordSubclass: 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 half-word-sized nonpointer variables."<br>
+ ^(ClassBuilder new)<br>
+ superclass: self<br>
+ variableHalfWordSubclass: t<br>
+ instanceVariableNames: f<br>
+ classVariableNames: d<br>
+ poolDictionaries: s<br>
+ category: cat<br>
+ !<br>
<br>
Item was added:<br>
+ ----- Method: Class>>variableHalfWordSubclas<wbr>s:uses:instanceVariableNames:c<wbr>lassVariableNames:poolDictiona<wbr>ries:category: (in category 'subclass creation') -----<br>
+ variableHalfWordSubclass: 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 half-word-sized nonpointer variables."<br>
+<br>
+ | newClass copyOfOldClass |<br>
+ copyOfOldClass := self copy.<br>
+ newClass := self<br>
+ variableHalfWordSubclass: 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: 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>
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 in which the subclass is to<br>
have indexable byte-sized nonpointer variables."<br>
| oldClassOrNil actualType 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 isWords])<br>
ifTrue: [^self error: 'cannot make a byte subclass of a class with word fields'].<br>
+ (aClass isVariable and: [aClass isHalfWords])<br>
+ ifTrue: [^self error: 'cannot make a byte subclass of a class with half word fields'].<br>
+ (aClass isVariable and: [aClass isDoubleWords])<br>
+ ifTrue: [^self error: 'cannot make a byte subclass of a class with double 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>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<br>
+ subclass of an existing class in which the subclass is to<br>
+ have indexable double-word-sized nonpointer variables."<br>
+ | env |<br>
+ (aClass instSize > 0)<br>
+ ifTrue: [^self error: 'cannot make a double word subclass of a class with named fields'].<br>
+ (aClass isVariable and: [aClass isBytes])<br>
+ ifTrue: [^self error: 'cannot make a double word subclass of a class with byte fields'].<br>
+ (aClass isVariable and: [aClass isHalfWords])<br>
+ ifTrue: [^self error: 'cannot make a double word subclass of a class with half word fields'].<br>
+ (aClass isVariable and: [aClass isWords])<br>
+ ifTrue: [^self error: 'cannot make a double word subclass of a class with word fields'].<br>
+ (aClass isVariable and: [aClass isPointers])<br>
+ ifTrue: [^self error: 'cannot make a double 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: #longs<br>
+ instanceVariableNames: f<br>
+ classVariableNames: d<br>
+ poolDictionaries: s<br>
+ category: cat!<br>
<br>
Item was added:<br>
+ ----- Method: ClassBuilder>>superclass:varia<wbr>bleHalfWordSubclass:instanceVa<wbr>riableNames:classVariableNames<wbr>:poolDictionaries:category: (in category 'public') -----<br>
+ superclass: aClass<br>
+ variableHalfWordSubclass: 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 in which the subclass is to<br>
+ have indexable half-word-sized nonpointer variables."<br>
+ | env |<br>
+ (aClass instSize > 0)<br>
+ ifTrue: [^self error: 'cannot make a half word subclass of a class with named fields'].<br>
+ (aClass isVariable and: [aClass isBytes])<br>
+ ifTrue: [^self error: 'cannot make a half word subclass of a class with byte fields'].<br>
+ (aClass isVariable and: [aClass isWords])<br>
+ ifTrue: [^self error: 'cannot make a half word subclass of a class with word fields'].<br>
+ (aClass isVariable and: [aClass isDoubleWords])<br>
+ ifTrue: [^self error: 'cannot make a half word subclass of a class with double word fields'].<br>
+ (aClass isVariable and: [aClass isPointers])<br>
+ ifTrue: [^self error: 'cannot make a half 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: #shorts<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<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>
ifTrue: [^self error: 'cannot make a word subclass of a class with named 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 isHalfWords])<br>
+ ifTrue: [^self error: 'cannot make a word subclass of a class with half word fields'].<br>
+ (aClass isVariable and: [aClass isDoubleWords])<br>
+ ifTrue: [^self error: 'cannot make a word subclass of a class with double word 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><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_4849613175710689249gmail_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>
</font></span></div>
<br><br>
<br></blockquote></div><br></div>