The following features of the Self VM have been ported to Linux
|NIC (non-inlining compiler)
|PIC (polymorphic inline-caches)
||needs more tests
Self on cygwin
To run Self on cygwin you need a recent installation of cygwin including XFree86. You can get these packages from http://www.cygwin.com.
Download the cygwin VM and Demo.snap from the download page and extract them. Start the VM and the snapshot with:
./Self -c -s Demo.snap
If you want to compile the VM on cygwin you also need to install the following packages:
The SIC (simple inlining compiler) is an optimizing compiler for Self, that is used to recompile methods that are called often. Since the linux port of the SIC is not as stable as the standard compiler, it is currently disabled by default. You can enable it by setting SICMaxCompilationCount to -1 by executing
To measure the difference you can try:
[10000000 do: ] cpuTime
On my machine (P4, 1800 Mhz) I get the following numbers
which is a speedup of factor 40 for this very special case.
- Random crashes of the VM.
The linux port has alpha status. If you want to do some serious work in Self, be sure to save snapshots very often!
- The Self prompt might leave the terminal in a kind of corrupted state. If you start Self VM for the second time in the same terminal it won't get any input from that terminal. As workaround you can start the VM in a new terminal. (e.g.
xterm -e Self -s Snapshot )
This should be fixed with 0.2.2
- Compilation of the VM sources results in a lot of warnings. The reason for this is that most of the original sources are from around 1995. I tried to keep the original code unchanged as much as possible, to make it easier to diff and merge with new releases from Sun.
- The Self VM won't work if compiled with GCC 3.0 (or higher). The Self VM makes use of the memory layout of C++ objects. GCC 3.x uses a new C++ ABI that is incompatible with previous versions. Updating the VM sources to work with the new C++ ABI would probably require quite a lot of work.
- configure script / autoconf
- completing SIC and recompilation
- Porting ui2 to native win32