[Vm-dev] VM Maker: VMMaker.oscog-eem.2347.mcz

Ben Coman btc at openinworld.com
Thu Mar 8 16:42:08 UTC 2018


On 8 March 2018 at 22:59, Alistair Grant <akgrant0710 at gmail.com> wrote:

>
> Hi Eliot,
>
> On Wed, Mar 07, 2018 at 10:46:41PM +0000, commits at source.squeak.org wrote:
> >
> > Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
> > http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2347.mcz
> >
> > ==================== Summary ====================
> >
> > Name: VMMaker.oscog-eem.2347
> > Author: eem
> > Time: 7 March 2018, 2:46:20.98144 pm
> > UUID: 062614a7-e3da-4b30-997a-9568911b9ff5
> > Ancestors: VMMaker.oscog-akg.2346
> >
> > Review of Alistair's recent FilePlugin changes:
> >
> > Alistair, in var:type: declarations use symbols for types, as these are
> shared in lots of cases.
>
> In my defense, the slang code I was looking at used strings.  But this
> makes sense and I'll change.
>
>
> > 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
> >       bytesWritten := self
> >                                               sqFile: file
> >                                               Write: count * elementSize
> >                                               From: (interpreterProxy
> cCoerce: (interpreterProxy firstIndexableField: array) to: #'char *')
> >                                               At: startIndex - 1 *
> elementSize.
> > instead of a self cCode: 'sqFileWriteFromAt(...)' form and you'll find
> an implementation at FilePluginSimulator>>#sqFile:Write:From:At:
>
> It looks like it's at the point where I need to understand
> the simulator (which I haven't looked at yet).
>
> I haven't seen it yet, but I'll definitely watch Clémnt's video.
> Where else should I look to get started with the simulator?
>

Here is a beginner picking the brains of the experts...
http://forum.world.st/Exploring-the-simulator-was-Re-REPL-image-for-simulation-td4896870.html

which Clement summarised here...
https://clementbera.wordpress.com/2016/05/30/simulating-the-cog-vm/

cheers -ben



> > In primitiveConnectToFile[Descriptor] you write
> >
> >       interpreterProxy failed ifFalse:
> >               [^interpreterProxy pop: 3 "rcvr, name, writeFlag"
> >                                                       thenPush:
> filePointer].
> >       ^interpreterProxy primitiveFail.
> >
> > but there's no point calling primitiveFail a secoind time given that
> interpreterProxy failed tells you the primitive has already failed.  Simply
> write
> >
> >       interpreterProxy failed ifFalse:
> >               [interpreterProxy pop: 3 "rcvr, name, writeFlag"
> >                                                       thenPush:
> filePointer]
>
> OK.
>
> Thanks for the feedback,
> Alistair
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20180309/aab6d1bf/attachment.html>


More information about the Vm-dev mailing list