[Pharo-dev] Some more effort to make Slang and VMMaker work on Pharo [for review]

ducasse stepharo at netcourrier.com
Tue May 14 16:33:49 EDT 2019


This is super nice and this was a couple of days well invested. I thought that it would be a lot more challenging
so you prove it by doing it fast and this is super cool.  In addition this is excellent that you added tests while doing it. 
I really want to have a tutorial on extending the VM with Pharo. 

Stef

> Hi all,
> 
> Just to keep everyone informed, last week I’ve spent a couple of days making slang work on Pharo again, based on the initial effort of Eliot.
> The summary of what I did is:
> 
>  - we can generate, compile and run a stack vm
>  - we can generate, compile and run a cog vm
> 
>  - for this, I’ve done a couple of patches to VMMaker
>   - the ones specific to Pharo has been pushed
>   - the ones that touch cross dialect code are still in review (I think) 
> 
> To do this work 
> 
>  - I had to review the AST-to-AST transformation, checking the output, comparing it to what squeak does and so on...
>  - I’ve written several unit tests to ensure that future migrations are easier to do
>  - I’ve introduced several compatibility classes/methods related to PackageInfo, Time and so on…
> 
> Cheers,
> Guille
> 
>> Inicio del mensaje reenviado:
>> 
>> De: Guillermo Polito <guillermopolito at gmail.com <mailto:guillermopolito at gmail.com>>
>> Asunto: Re: [Vm-dev] Some more effort to make Slang and VMMaker work on Pharo [for review]
>> Fecha: 9 de mayo de 2019, 17:48:03 CEST
>> Para: Open Smalltalk Virtual Machine Development Discussion <vm-dev at lists.squeakfoundation.org <mailto:vm-dev at lists.squeakfoundation.org>>
>> 
>> I've decided for the moment to put the tests in the PharoCompatibility package, since they are too close of Pharo's AST.
>> I've tried to make them work in squeak but I've found too many incompatibilities in the AST and some in the collections that would make the tests too verbose to make them reusable...
>> Maybe we can do an iteration afterwards.
>> 
>> Cheers,
>> Guille
>> 
>> On Thu, May 9, 2019 at 5:21 PM Guillermo Polito <guillermopolito at gmail.com <mailto:guillermopolito at gmail.com>> wrote:
>> Hi all,
>> 
>> On Wed, May 8, 2019 at 2:17 AM David T. Lewis <lewis at mail.msen.com <mailto:lewis at mail.msen.com>> wrote:
>>  
>> 
>> On Tue, May 07, 2019 at 03:36:32PM -0700, Eliot Miranda wrote:
>> 
>> > In VMMaker.oscog-GAP.2533 I would prefer to see printString instead of
>> > asString.  asString is a horrible hack.  printString says what we mean.
>> 
>> Sure. I've submitted another version to the inbox:
>> 
>> Name: VMMaker.oscog-GAP.2534
>> Author: GAP
>> Time: 9 May 2019, 5:12:22.055089 pm
>> UUID: cd6aae16-6f20-4ddb-9328-64b19b413cb1
>> Ancestors: VMMaker.oscog-eem.2532
>> 
>> Convert numeric constants to strings for concatenation using #printString.
>> Required for Pharo compatibility, where the arguments of concatenation are not automatically coerced to strings.
>>  
>> > ==== Patch 1 ====
>> > > Name: VMMaker.oscog-GAP.2533
>> > > Author: GAP
>> > > Time: 7 May 2019, 10:57:16.034354 am
>> > > UUID: 3209319f-60f3-4586-8d03-cfac3c9fddee
>> > > Ancestors: VMMaker.oscog-eem.2532
>> > >
>> > > Convert numeric constants to strings for concatenation.
>> > > Required for Pharo compatibility, where the arguments of concatenation are
>> > > not automatically coerced to strings.
>> > >
>> > 
>> > I trust you on these.  I'm not really in a position to test this out right
>> > now.  I suggest you push the  VMMakerCompatibilityForPharo6 packages to
>> > VMMaker as soon as you'd like.  You can write VMMaker right?
>> > 
>> 
>> +1
>> 
>> Guille, if you want commit access to the repo, you can make an account
>> on source.squeak.org <http://source.squeak.org/> and I'll add you the the VMMaker project. Or if
>> it's easier, just say which packages you are ready to move and either
>> I or Eliot (or any of the others with commit access) will move it to
>> VMMaker for you.
>> 
>> I note that VMMaker.oscog-GAP.2533 package is part of the main
>> VMMaker.oscog package. If you need to have that tested on Squeak I
>> can probably do that for you within the next couple of days if no
>> one else gets to it first.
>> 
>> Well, the change I did in that package was fairly small, and I'm using squeak to generate also some parts of the VM to compare to what I generate from Pharo.
>> So, I'd say I've tried it myself already.
>> 
>> For the Pharo specific package, I've already uploaded it to the VMMaker repository.
>> I had already rights to do it :).
>> 
>> Name: VMMakerCompatibilityForPharo6-GuillermoPolito.11
>> Author: GuillermoPolito
>> Time: 9 May 2019, 5:15:50.00473 pm
>> UUID: e1a685a9-d744-0d00-b3c1-ad600f1a7e9a
>> Ancestors: VMMakerCompatibilityForPharo6-GuillermoPolito.10
>> 
>> With these changes I can already compile and run Cog and almost all tests pass :)
>> 
>> <image.png>
>> 
>> I have also a couple dozen tests about AST translation and C generation, mainly about those parts that are covered differently between Pharo's and Squeak's ASTs.
>> Would you like that I push them inside the VMMaker package or make a separate package?
>> 
>> Thanks!
>> Guille
>> 
>> 
>> -- 
>>    
>> Guille Polito
>> Research Engineer
>> 
>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>> CRIStAL - UMR 9189
>> French National Center for Scientific Research - http://www.cnrs.fr <http://www.cnrs.fr/>
>> 
>> Web: http://guillep.github.io <http://guillep.github.io/>
>> Phone: +33 06 52 70 66 13
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20190514/cefbfed6/attachment.html>


More information about the Pharo-dev mailing list