> Alternatively, there is a way to display where the operations come
from, but only during testing.  <br><br>I did this; which was good advice, as it generated several errors that the ordinary compiler doesn&#39;t flag.<br><br>After fixing those up, I get the following (paraphrased):<br><br>
pop__AccessDirect_None:46 setarrayitem_gc(p30, Const(0), Const(* None), descr=&lt;Descr &quot;4, &#39;r&#39;&quot;&gt;)<br>pop__AccessDirect_None:46 setarrayitem_gc(p30, Const(1), Const(* None), descr=&lt;Descr &quot;4, &#39;r&#39;&quot;&gt;)<br>
compare__AccessDirect_None:34 i138 = uint_lt(i137, Const(10000))<br>compare__AccessDirect_None:38 guard_true(i138, ...<br>ll_contains__dicttablePtr_Signed:10 i139 = call(Const(&lt;AddressAsInt * fn ll_dict_lookup__dicttablePtr_Signed_Signed&gt;), Const(*dicttable), Const(21), Const(21), descr=&lt;Descr &quot;0, &#39;i&#39;, E&quot;&gt;)<br>
ll_contains__dicttablePtr_Signed:10 guard_no_exception(...<br>ll_contains__dicttablePtr_Signed:14 i40 = int_and(i139, Const(-2147483684))<br>ll_contains__dicttablePtr_Signed:17 141 = int_is_true(140)<br><br>followed by much more dicttable stuff. So that doesn&#39;t really help me pinpoint the problem, unless *dicttable is some magic constant? What do the offsets reference - they don&#39;t correspond to line numbers.<br>
<br>Here&#39;s my compare function for what it&#39;s worth. Note that there is an implicit downcast in order to get intValue. In the above loop, the klass&#39;s of both objects is Int, which the JIT is able to deduce.<br>
<br>class Frame:<br>    # ...<br>    def compare(self, a, b):<br>        &quot;&quot;&quot; Compares two values using the builting comparison operator. <br>Returns -1, 0, 1 or -99, where -99 means NaN comparison, otherwise such that (a op b) iff (result op 0)&quot;&quot;&quot;<br>
        import math<br>        if a.klass == Int and b.klass == Int:<br>            if a.intValue &lt; b.intValue:<br>                return -1<br>            elif a.intValue &gt; b.intValue:<br>                return 1<br>
            else:<br>                return 0<br>        #elif a.klass in (Int, Uint, Number) and b.klass in (Int, Uint, Number):<br>        #    aValue = self.space.toNumber(a)<br>        #    bValue = self.space.toNumber(b)<br>
        #    if math.isnan(aValue):<br>        #        return -99<br>        #    if math.isnan(bValue):<br>        #        return -99<br>        #    if aValue &lt; bValue:<br>        #        return -1<br>        #    elif aValue &gt; bValue:<br>
        #        return 1<br>        #    else:<br>        #        return 0<br><br>        raise StandardError(&quot;Not implemented&quot;)<br><br><br><br><div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>