[Vm-dev] VM Maker: VMMaker.oscog-eem.2347.mcz
Eliot Miranda
eliot.miranda at gmail.com
Thu Mar 8 15:57:51 UTC 2018
Hi Alistair,
_,,,^..^,,,_ (phone)
> On Mar 8, 2018, at 6:59 AM, 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?
It should be as simple as following the instructions on http://www.mirandabanda.org/cogblog/build-image/
but since we no longer include the processor simulator plugins in the standard vm builds, the VM obtained by
image/getGoodSpur[64]VM.sh
won't allow simulating the CoInterpreter (the JIT), only the StackInterpreter. So this needs to be fixed.
I could build the processor simulator plugins 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.
>
>
>> 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/20180308/a8787c9b/attachment.html>
More information about the Vm-dev
mailing list