<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-10-21 1:07 GMT+02:00  <span dir="ltr">&lt;<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:<br>
<a href="http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1497.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/VMMaker/VMMaker.oscog-eem.1497.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: VMMaker.oscog-eem.1497<br>
Author: eem<br>
Time: 20 October 2015, 4:07:03.853 pm<br>
UUID: 0719f4d7-3dd5-4f5c-bc36-07461475c215<br>
Ancestors: VMMaker.oscog-eem.1496<br>
<br>
Make sure signed comparisons are used in the relevamt isIntegerValue: implementations.<br>
<br>
=============== Diff against VMMaker.oscog-eem.1496 ===============<br>
<br>
Item was changed:<br>
  ----- Method: ObjectMemory&gt;&gt;isIntegerValue: (in category &#39;interpreter access&#39;) -----<br>
  isIntegerValue: intValue<br>
        &quot;Answer if the given value can be represented as a Smalltalk integer value.<br>
         In C, use a shift and XOR to set the sign bit if and only if the top two bits of the given<br>
         value are the same, then test the sign bit. Note that the top two bits are equal for<br>
         exactly those integers in the range that can be represented in 31-bits or 63-bits.&quot;<br>
        &lt;api&gt;<br>
        ^self<br>
+               cCode: [(intValue bitXor: (intValue &lt;&lt; 1)) asInteger &gt;= 0]<br>
-               cCode: [(intValue bitXor: (intValue &lt;&lt; 1)) &gt;= 0]<br>
                inSmalltalk: [intValue &gt;= 16r-40000000 and: [intValue &lt;= 16r3FFFFFFF]]!<br>
<br></blockquote><div><br></div><div>To be even more pedantic and warnig free, this is what I have since March:<br><br>    ^self<br>        cCode: [(intValue asUnsignedInteger bitXor: (intValue asUnsignedInteger &lt;&lt; 1)) asInteger &gt;= 0]<br>        inSmalltalk: [intValue &gt;= self minSmallInteger and: [intValue &lt;= self maxSmallInteger]]<br><br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Item was changed:<br>
  ----- Method: Spur32BitMemoryManager&gt;&gt;isIntegerValue: (in category &#39;interpreter access&#39;) -----<br>
  isIntegerValue: intValue<br>
        &quot;Answer if the given value can be represented as a Smalltalk integer value.<br>
         In C, use a shift and XOR to set the sign bit if and only if the top two bits of the given<br>
         value are the same, then test the sign bit. Note that the top two bits are equal for<br>
         exactly those integers in the range that can be represented in 31-bits or 63-bits.&quot;<br>
        &lt;api&gt;<br>
        ^self<br>
+               cCode: [(intValue bitXor: (intValue &lt;&lt; 1)) asInteger &gt;= 0]<br>
-               cCode: [(intValue bitXor: (intValue &lt;&lt; 1)) &gt;= 0]<br>
                inSmalltalk: [intValue &gt;= 16r-40000000 and: [intValue &lt;= 16r3FFFFFFF]]!<br>
<br>
</blockquote></div><br></div></div>