I currently (as of January 1999) use Suse Linux 6.0, Kernel 2.0.36, glibc 2.0.7pre6,
and egcs 1.0.3.
The self source are located in a directory named 'self' in my home directory.
My ~/.bashrc contains a section like this:
if [ -n "$LD_LIBRARY_PATH" ] ; then
Compiling the Tools
Go to ~/self/bin/linux, and type 'make'.
Make Include and Dependency Lists
Go to ~/self/vm/linux/generated, and type 'make lists'.
Sometimes he complains about some missing directory. That directory has
to be created first.
Make glue Code
Go to ~/self/objects/glue/linux, and type 'make'.
Make Self VM itself
Go to ~/self/vm/linux/debug, and type 'make Self'. (There
is also a pretty neat parallel make script called mf which I do not use
because I only have one computer, and I do not have a lockd)
Execute the Self VM
All features that deal with snapshot reading and signal stack have to be
switched off, so go to ~/self/vm/linux/debug and either call
Self -F -l hello.txt -t -p
or what makes much more sense at the moment:
where DEBUGGER can be any of gdb, xxgdb, ddd or whatever you like.
Note that there is a file .gdbinit inside this directory that sets the
arguments and also defines some useful breakpoints.
Try Out Some Self Code
What I tried successfully so far is:
Where I am sticking right now is:
Block cloning does not work yet.
( | x = 17. y = 18 | ) x
( | x = 17. y = 18 | ) y
( | x <- 17. y = 18 | ) x
( | x <- 1 | ) x: 2
1 _IntAdd: 1
( | x:a = (| b | b:a. b: (b _IntAdd: 1). b ) | ) x: 1
[ | :a. b | b:a. b: (b _IntAdd: 1). b ]