<div dir="ltr">Hi Max,<div><br></div><div>   fixed in Squeak via a preamble in a new version of Traits.  I must remember to fix this in the bootstrap so that it doesn&#39;t afflict Pharo Spur.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 23, 2015 at 4:34 AM, Max Leske <span dir="ltr">&lt;<a href="mailto:maxleske@gmail.com" target="_blank">maxleske@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><div><div class="h5"><blockquote type="cite"><div>On 22 Aug 2015, at 19:21, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr">Hi Max,<div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 21, 2015 at 2:11 PM, Max Leske <span dir="ltr">&lt;<a href="mailto:maxleske@gmail.com" target="_blank">maxleske@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span><blockquote type="cite"><div>On 21 Aug 2015, at 19:31, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hi Max,<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 21, 2015 at 8:57 AM, Max Leske<span> </span><span dir="ltr">&lt;<a href="mailto:maxleske@gmail.com" target="_blank">maxleske@gmail.com</a>&gt;</span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi folks<br><br>I’ve been trying to load Fuel into Squeak 5 but can’t because I get errors when loading Traits (they have not instance variables). The reason for this error seems to be that #instSize answers 2 for Traits when it should answer 0.<br><br>The current implementation is:<br><br>^format bitAnd: 16rFFFF<br><br>The comment in the 4.6 version says:<br><br>&quot;<br>       <span> </span>NOTE: This code supports the backward-compatible extension to 8 bits of instSize.<br>       <span> </span>When we revise the image format, it should become...<br>       <span> </span>^ ((format bitShift: -1) bitAnd: 16rFF) - 1<br>       <span> </span>Note also that every other method in this category will require<br>       <span> </span>2 bits more of right shift after the change.<br>“<br><br>When I use that version in TraitBehaviour&gt;&gt;instSize in Squeak 5 I get 0 as expected and I can load Fuel without problems.<br></blockquote><div><br></div><div>So Spur has a different layout for format than V3.  The above implementation (format bitAnd: 16rFFFF) is correct for Spur.  In loading classes or traits via Fuel from 4.6 to 5.0 you&#39;re going to have to convert the format inst var to reflect its usage in Spur.  So we need to be clear here.</div><div><br></div><div>Is the issue that you&#39;re trying to load classes and/or traits from a Fuel file written by 4.6 or is it that as part of the Fuel load a new Trait gets created which has a format of 2?</div></div></div></div></div></blockquote><div><br></div></span><div>The latter. This is reproducible by simply creating a new Trait:</div><div><br></div><div>Trait named: #NewTrait</div><div><span style="white-space:pre-wrap">        </span>uses: #()</div><div><span style="white-space:pre-wrap">        </span>category: ‘new cat’.</div><div>NewTrait instSize “—&gt; 2”</div></div></div></blockquote><div><br></div><div>I just took a look at this and it doesn&#39;t reproduce.  I&#39;m using a trunk Squeak 5 image and I get 0 and required. ?</div></div></div></div></div></blockquote><div><br></div></div></div><div>Thanks Eliot. You’re right. The problem is not with #instSize, I don’t know how I managed to get the above…</div><div><br></div><div>The problem is actually, that TApplyingOnClassSide (which is already present) has a format of 2:</div><div><br></div><div>TApplyingOnClassSide instSize “—&gt; 2”</div><div><br></div><div><br></div><div>Also, all Traits in the image have format 2, while new Traits have format 0:</div><div><br></div><div><div>format2 := Smalltalk allTraits select: [ :e | e format = 2 ].</div><div>Smalltalk allTraits size = format2 size “—&gt; true&quot;</div><span class=""><div><br></div><div>Trait named: #NewTrait</div><div><span style="white-space:pre-wrap">        </span>uses: #()</div><div><span style="white-space:pre-wrap">        </span>category: &#39;new cat’.</div><div><br></div></span><div>NewTrait instSize “—&gt; 0&quot;</div><div><div>format2 := Smalltalk allTraits select: [ :e | e format = 2 ].</div><div>Smalltalk allTraits size = format2 size “—&gt; false”</div><div><br></div><div><br></div><div>This is with build 15113 (which is trunk I suppose).</div><div><br></div><div>Cheers,</div><div>Max</div></div></div><span class=""><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>Cheers,<br></div><div>Max</div><span><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>Cheers,<br>Max<br></blockquote></div><br><br clear="all"><div><br></div>--<span> </span><br><div><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div></div></blockquote></span></div><br></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>
</div></blockquote></span></div><br></div><br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="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>