<div dir="ltr">What about bytecode pc's? These are indexed based on the physical size of the literals. I don't like the idea of debugging pc -> 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"><<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>></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'm making good progress on 64-bit Spur in the Stack VM simulator. But I'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>>digitAt: n <div><span style="white-space:pre-wrap">        </span>"Answer the value of an indexable field in the receiver. LargePositiveInteger uses bytes of base two number, and each is a 'digit' base 256. Fail if the argument (the index) is not an Integer or is out of bounds."</div><div><span style="white-space:pre-wrap">        </span>n>4 ifTrue: [^ 0].</div><div><span style="white-space:pre-wrap">        </span>self < 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>["Can't negate minVal -- treat specially"</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's complement.</div><div><br></div><div>I'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>