<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Alistair,<br></div><div><br><div><br><br><span style="background-color: rgba(255, 255, 255, 0);">_,,,^..^,,,_ (phone)</span></div>On Mar 8, 2018, at 6:59 AM, Alistair Grant <<a href="mailto:akgrant0710@gmail.com">akgrant0710@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span></span></div></blockquote><blockquote type="cite"><div><span>Hi Eliot,</span><br><span></span><br><span>On Wed, Mar 07, 2018 at 10:46:41PM +0000, <a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a> wrote:</span><br><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Eliot Miranda uploaded a new version of VMMaker to project VM Maker:</span><br></blockquote><blockquote type="cite"><span><a href="http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2347.mcz">http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2347.mcz</a></span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>==================== Summary ====================</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Name: VMMaker.oscog-eem.2347</span><br></blockquote><blockquote type="cite"><span>Author: eem</span><br></blockquote><blockquote type="cite"><span>Time: 7 March 2018, 2:46:20.98144 pm</span><br></blockquote><blockquote type="cite"><span>UUID: 062614a7-e3da-4b30-997a-9568911b9ff5</span><br></blockquote><blockquote type="cite"><span>Ancestors: VMMaker.oscog-akg.2346</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Review of Alistair's recent FilePlugin changes:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Alistair, in var:type: declarations use symbols for types, as these are shared in lots of cases.</span><br></blockquote><span></span><br><span>In my defense, the slang code I was looking at used strings.  But this</span><br><span>makes sense and I'll change.</span><br><span></span><br><span></span><br><blockquote type="cite"><span>With several plugins, but especially the FilePlugin and SocketPlugin, avoid using cCode: 'aString(...)' inSmalltalk: [passive default] because this is not simulateable.  For example in FilePlugin>>#primitiveFileWrite you'll see</span><br></blockquote><blockquote type="cite"><span>    bytesWritten := self</span><br></blockquote><blockquote type="cite"><span>                        sqFile: file</span><br></blockquote><blockquote type="cite"><span>                        Write: count * elementSize</span><br></blockquote><blockquote type="cite"><span>                        From: (interpreterProxy cCoerce: (interpreterProxy firstIndexableField: array) to: #'char *')</span><br></blockquote><blockquote type="cite"><span>                        At: startIndex - 1 * elementSize.</span><br></blockquote><blockquote type="cite"><span>instead of a self cCode: 'sqFileWriteFromAt(...)' form and you'll find an implementation at FilePluginSimulator>>#sqFile:Write:From:At:</span><br></blockquote><span></span><br><span>It looks like it's at the point where I need to understand</span><br><span>the simulator (which I haven't looked at yet).</span><br><span></span><br><span>I haven't seen it yet, but I'll definitely watch ClĂ©mnt's video.</span><br><span>Where else should I look to get started with the simulator?</span><br></div></blockquote><div><br></div>It should be as simple as following the instructions on <a href="http://www.mirandabanda.org/cogblog/build-image/">http://www.mirandabanda.org/cogblog/build-image/</a><div>but since we no longer include the processor simulator plugins in the standard vm builds, the VM obtained by</div><div>    image/getGoodSpur[64]VM.sh</div><div>won't allow simulating the CoInterpreter (the JIT), only the StackInterpreter.  So this needs to be fixed.</div><div><br></div><div>I could build <span style="background-color: rgba(255, 255, 255, 0);">the processor simulator plugins</span> and put them on my website or we could set up a build on the CI infrastructure.  But with the latter I could do with some help.</div><div><br><blockquote type="cite"><div><span></span><br><span></span><br><blockquote type="cite"><span>In primitiveConnectToFile[Descriptor] you write</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>    interpreterProxy failed ifFalse:</span><br></blockquote><blockquote type="cite"><span>        [^interpreterProxy pop: 3 "rcvr, name, writeFlag"</span><br></blockquote><blockquote type="cite"><span>                            thenPush: filePointer].</span><br></blockquote><blockquote type="cite"><span>    ^interpreterProxy primitiveFail.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>but there's no point calling primitiveFail a secoind time given that interpreterProxy failed tells you the primitive has already failed.  Simply write</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>    interpreterProxy failed ifFalse: </span><br></blockquote><blockquote type="cite"><span>        [interpreterProxy pop: 3 "rcvr, name, writeFlag"</span><br></blockquote><blockquote type="cite"><span>                            thenPush: filePointer]</span><br></blockquote><span></span><br><span>OK.</span><br><span></span><br><span>Thanks for the feedback,</span><br><span>Alistair</span><br></div></blockquote></div></body></html>