[self-interest] Self on Linux

Gordon at Cichon.de Gordon at Cichon.de
Mon Jan 18 10:15:58 UTC 1999


Hi all,

I am so terribly fed up with C++, I really would like to
write real programs in a better programming language.
Fortunately, the source code of Self is publicly available :-)
I just started a Linux/i386 port of Self 4.0.

After some problems generating the include file stuff, I am
able to compile the stuff under Linux. (The signal stack stuff
is not going to work until Kernel 2.2, though). First, I did 
not care about the Sparc code generation stuff. The Self parser 
seemed to work then, and the system also survived the initial
scavenge. I got through to the Self VM prompt. The Self parser 
complained about syntax errors, and as soon as I entered correct 
Self expressions, it started to generate Sparc code.

Next, I wrapped the GNU assembler into the Self kind of object
oriented shell, in order to generate i386 code. This already
compiles. I already changed about 30% of NIC to generate i386
code.

I still have some doubts whether I understand the Sparc stack 
frame right. I was not able to obtain a Sparc documentation on 
the web, and I still do not understand, when and where Sparc 
saves its register windows on the stack. Especially, there are 
24 entries reserved on the stack for the register window while 
there are only 16 registers saved to my knowledge (8 incoming 
+ 8 local). Is anybody out there who could help me with the
details of Sparc register window architecture?

I think, it is also going to be hard work to change SIC to
a two-address machine with little registers. It would be nice
to switch off SIC completely until NIC runs. Unfortunately
the ´SIC_COMPILER´ define does not work well for this purpose 
and leaves a lot undefined symbols especially in recompiler.c.
Well, I think that even a not register optimized SIC that does
inlining would still be nice to run Self on i386.

Since the Self license allows modification and redistribution of
the Self code (please correct me if I´m wrong), I intend to put
the stuff under GPL.

Gordon.

------------------------------------------------------------------------
eGroup home: http://www.eGroups.com/list/self-interest
Free Web-based e-mail groups by eGroups.com




More information about the Self-interest mailing list