[self-interest] Re: How does the Self VM work?

Douglas Atique datique at pcs.usp.br
Tue Oct 27 19:03:38 UTC 1998

Hello, Jecel, everyone.

Well, I would like both theoretical and practical explanations. I have read papers but it is not necessarily true that I understood it all. If you are pleased with the idea of a generic explanation about adaptive compilation, I would be glad to "listen to" it. But yes, I am reading Self 4.0 VM source code and would also like some explanation on how to start reading that bunch of C++. I have tried to systematically read each class but it is not very productive, at least for my knowledge level. It is too bigger and more complicated than every code I have already seen.
I also have doubts on the development environment. This document (vmUseDoc), for instance, tells a lot about how to setup a personal copy of the Self code and VM sources to make enhancements to the project.
There are lots of shell scripts that make lots of small tasks, and also some programs in C++. 
One of these programs, for example, makeDepsAndIncs, creates include files for every source file to automate the task of making class declarations available to other classes that depend on them. It is incredibly ingenious. The includeDB is a file that lists all the dependencies of one file on every other, which is very easy to maintain. Then one only runs a script that invokes this makeDepsAndIncs and you have the includes ready. All this is ready for Solaris on SPARC. When I tried to compile it, first on Linux, then on Win32 with GCC (Cygwin32) then with Borland C++Builder, it didn`t work. It behaves strangely and sometimes running it causes an error. I think there is a memory leak somewhere, as when I run it on Linux it says there is not enough memory, and Windows (compiled with GCC-CygWin32) exits with a GPF. Windows compiled with Borland C++ doesn`t crash, but exits with a error. Debugging the program, I found out that sometimes a character '\x0E' is inserted in the middle of the filename strings that the program inserts in the include files. I stopped here and that's where I am now. Is someone there acquainted with the Self development environment that could understand what I said?
Another strange thing is that the source directories explanation lists directories (like the new_compiler) which don`t appear in the Self 4.0 VM sources, and some directories that appear in the sources are not listed there. In fact, the directories explained in vmUseDoc seem to be the ones in the Self 3.0 VM sources (the ones you arranged for me, thanks).

As you see, I have looked at many aspects of the VM, so I have doubts of the most eclectic kinds. Let me organize it. I would like to start from the beginning, so that other people that like Self can understand all this.
Could we start by explaining what Self is and what adaptive compilation is? I think this will help me refresh my memory, correct eventual misunderstandings I may have and help newcomers to this list find out what they are getting into. :-)


See the original message at http://www.egroups.com/list/self-interest/?start=6
Free e-mail group hosting at http://www.eGroups.com/
Subscribe, unsubscribe, opt for a daily digest, or start a new e-group
at http://www.eGroups.com -- Free Web-based e-mail groups.

More information about the Self-interest mailing list