[Vm-dev] implementing atomic operator

Eliot Miranda eliot.miranda at gmail.com
Fri Nov 6 15:30:43 UTC 2015


Mariano,

> On Nov 4, 2015, at 5:14 PM, Mariano Martinez Peck <marianopeck at gmail.com> wrote:
> 
> 
> 
>> On Wed, Nov 4, 2015 at 7:34 PM, Sebastián Krynski <skrynski at gmail.com> wrote:
>>  
>> Hello, as I mentioned before I'm starting to implement an atomic operator (a swap between two variables).
>> I have compiled the StackVM (at least to get started) in Ubuntu 32bits.
> 
> Great!!!
>  
>> A few questions:
>> 
>> - Should I be working on generation.image while doing the implementation? If so, should I be running the simulated VM running another image while doing my tests?
> 
> As far as I know having a working simulator working requires quite some effort. At least, with a Pharo image. A couple of months ago (maybe a couple of years) there was another Argentinian which finally made the simulator to work with Pharo 2.0. You may want to get in touch with Nicolás Papagna Maldonado 
> 
> For the developments I did I always used the "generation.image" and then use the VM I built. I never used the simulator for real.

Clément, Esteban and I use,  and I maintain, the Cog simulator.  How do you think the VM is developed in the first place?  It is easy to derive a squeak image containing the full simulator, and a little effort on fixing the transcript yields a working Pharo simulator image.  The scripts in the svn tree in the image directory build a full simulation image.  Scripts can and should be added there to build a Pharo simulator image.

Please refrain from suggesting that the simulator is forked.  Sebastián, please talk with Clément and Esteban regarding simulation in Pharo.

Mariano, you were hobbling yourself not using the simulator.

>  
>> - Do you think it is possible to implement the operations in Slang or using  #cCode:inSmalltalk:? Otherwise I will need to do it in assembler and inline it
> 
> Well...it depends on what you need to write exactly. Slang is quite limited since it must be automagically translated to C. So you must be careful in the "smalltalk" code you write with SLANG. To know more or less what you are able to write in SLANG you could take a look to #initializeCTranslationDictionary (at least this was some years ago). 
> 
> BTW, you may want to read this: https://marianopeck.wordpress.com/tag/slang/

No, no, no, no :).  This level of Slang addresses the mapping of Smalltalk control structures and integer types to C control structures and integer types. It should *not* be used to add api calls.


> 
> Cheers,
> 
> 
>  
>> Thanks
>> Sebastián
> 
> 
> 
> -- 
> Mariano
> http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20151106/c120b548/attachment-0001.htm


More information about the Vm-dev mailing list