<div dir="ltr">What about bytecode pc&#39;s? These are indexed based on the physical size of the literals. I don&#39;t like the idea of debugging pc -&gt; source mappings, pc coverage data, etc needing invalidation after starting an image on a platform with a different word size.<div><br><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 18, 2014 at 7:12 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@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 dir="ltr">Hi All,<div><br></div><div>    I&#39;m making good progress on 64-bit Spur in the Stack VM simulator.  But I&#39;ve just noticed an image-level issue which could be indicative of lots of 32-bit assumptions baked into the Squeal/Pharo/Newspeak systems.</div><div><br></div><div>SmallInteger&gt;&gt;digitAt: n <div><span style="white-space:pre-wrap">        </span>&quot;Answer the value of an indexable field in the receiver.  LargePositiveInteger uses bytes of base two number, and each is a &#39;digit&#39; base 256.  Fail if the argument (the index) is not an Integer or is out of bounds.&quot;</div><div><span style="white-space:pre-wrap">        </span>n&gt;4 ifTrue: [^ 0].</div><div><span style="white-space:pre-wrap">        </span>self &lt; 0</div><div><span style="white-space:pre-wrap">                </span>ifTrue: </div><div><span style="white-space:pre-wrap">                        </span>[self = SmallInteger minVal ifTrue:</div><div><span style="white-space:pre-wrap">                                </span>[&quot;Can&#39;t negate minVal -- treat specially&quot;</div><div><span style="white-space:pre-wrap">                                </span>^ #(0 0 0 64) at: n].</div><div><span style="white-space:pre-wrap">                        </span>^ ((0-self) bitShift: (1-n)*8) bitAnd: 16rFF]</div><div><span style="white-space:pre-wrap">                </span>ifFalse: [^ (self bitShift: (1-n)*8) bitAnd: 16rFF]</div><div><br></div><div>This assumes that SmallInteger is only ever 4 bytes, which is unacceptably wasteful for my approach to 64-bits. In 64-bit Spur, SmallIntegers are 61-bit 2&#39;s complement.</div><div><br></div><div>I&#39;m raising this example at this point to see if the community might find similar issues and bring them to my attention.</div><span class="HOEnZb"><font color="#888888">-- <br><div>best,<div>Eliot</div></div>
</font></span></div></div>
</blockquote></div><br></div></div></div>