<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 29.08.2010, at 23:02, Eliot Miranda wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Sun, Aug 29, 2010 at 1:31 PM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</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"><div class="im"><br><div><div>On 29.08.2010, at 22:22, Eliot Miranda wrote:</div><br><blockquote type="cite"><br><br><div class="gmail_quote">On Sun, Aug 29, 2010 at 12:56 PM, Ken G. Brown <span dir="ltr">&lt;<a href="mailto:kbrown@mac.com" target="_blank">kbrown@mac.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>Running a fresh Squeak4.2-10382-alpha on your latest 5.8b4.<br>
<br>
</div>Open image, do Save As new version. then quit.<br>
Attempt to open saved new version image on Squeak 4.2.4beta1U.app by dragging and dropping on VM, it does not open.<br>
Console message:<br>
10/08/29 1:51:57 PM &nbsp; &nbsp; [0x0-0x2fe2fe].org.squeak.Squeak[8275] &nbsp;This interpreter (vers. 6502) cannot read image file (vers. 6505).<br></blockquote><div><br></div><div>John's &nbsp;5.8b4 is a Cog VM. &nbsp;Once an image is saved on Cog it will only run on a Cog VM.</div>

<div><br></div><div>cheers</div><div>Eliot</div></div></blockquote><br></div></div><div>I'm sure you mentioned it before, but where can I read about the image format changes?</div></div></blockquote><div><br></div><div>
Lazily I've yet to write this up. &nbsp;But I think the only change above and beyond support for the closure bytecodes (and not using BlockContext at all) is that&nbsp;image float order now depends on platform, so on x86 it is little-endian; this was forced by the JIT implementation of floating-point arithmetic (its hard to byte swap efficiently given the lack of sophistication of the code generator), and by my not wanting to waste cycles converting to/from big-endian byte order on image load/save or image segment export. &nbsp;Bit 1 of the image header flags word (which used to contain only the full screen flag) is 1 if the image's floats are little-endian. &nbsp;So the existing VMs would need to read and write this bit and either convert back to big-endian or copy the Cog VMs in keeping floats in platform-specific order. &nbsp;For me throwing performance away on each floating-point op on x86 is a heinous sin, so at least internally floats should be little-endian. &nbsp;The basicAt: &amp; basicAt:put: primitives 38 &amp; 39 need to be implemented to present floats as big endian to the image level.</div>
<div><br></div><div>There are other changes to the image header, using unused bits and fields to store Cog-specific info and it would be convenient if the standard VMs preserve these fields. &nbsp;But they don't prevent loading on a standard VM; IIRC only the float-order changes would cause errors running a Cog image on a closure-enabled Interpreter VM.</div>
<div><br></div><div>If people think this is important enough I could put together a change set for VMMaker that includes the relevant changes (to image load/save, floating-point arithmetic, image segment load/store and float at:/at:put:).</div>
<div><br></div><div>best</div><div>Eliot</div></div></blockquote><br></div><div>If it's really so easy to make the regular VM work with that image, couldn't we just do it and not even bump the format?</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Lucida Grande; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="font-family: Helvetica; "><span class="Apple-style-span" style="font-family: Helvetica; ">- Bert -</span></div><br class="Apple-interchange-newline"></span>
</div>
<br></body></html>