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

Guillermo Polito guillermopolito at gmail.com
Tue May 7 09:27:50 UTC 2019

Hi all,

In the last couple of days I've worked a bit on making VMMaker work in
Pharo again, based on the original effort of Eliot. I've produced a couple
of patches that I've left in the VMMaker inbox (below I past the commits'

With these changes I was able to generate, compile and run successfully so
far the Stack VM on OSX (mojave). I've tried it with opensmalltalk-vm's
platform code commit a838346b1, which is a commit previous to the migration
to Metal.

To make this work I've written some tests too. I've packaged them so far in
a separate package (VMMaker-Tests). I've seen that currently VMMaker tests
are inside the VMMaker package itself, but some of them are red in Pharo. I
can move those tests to the VMMaker package itself if people see a value on

In any case, I'm just submitting this for review :).


==== 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.

==== Patch 2 - Pharo specific package ====
Name: VMMakerCompatibilityForPharo6-GuillermoPolito.10
Author: GuillermoPolito
Time: 7 May 2019, 11:03:08.229705 am
UUID: 4f49f938-aa44-0d00-8739-04000059f8ce
Ancestors: VMMakerCompatibilityForPharo6-eem.9

Fixes in AST translation to make it work as in Squeak
- to:do: => to:by:do: with extra arguments
- ifNil:ifNotNil: => ifTrue:ifFalse:
- fix arguments in TMethods
- fix comments in TMethods
- add name at the level of TParseNode (#name is not defined in Object
anymore in Pharo)

- Added FileDirectory compatibility layer using FileSystem behind the
scenes (see FileDirectory and VMMakerFile classes).
- Added PackageOrganizer compatibility layer using RPackage behind the
- Extending Scanner and SystemNavigation with compatibility methods
- Extending Time with compatibility method

==== Patch 3 - Tests ====
Name: VMMakerTests-GuillermoPolito.1
Author: GuillermoPolito
Time: 7 May 2019, 11:27:14.195596 am
UUID: 77f9288f-aa44-0d00-873a-d0970059f8ce

Tests for AST translation and C code generation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190507/f68c3b58/attachment.html>

More information about the Vm-dev mailing list