[self-interest] studying the Self 4.0 VM sources

Jecel Assumpcao Jr jecel at lsi.usp.br
Thu Nov 5 02:12:58 UTC 1998


This is a general discussion list about Self, so not everyone will be
interested in hearing about the virtual machine's internals. I promised
I would say a little about it, however, so here it is:

When looking at any large C++ program, the first thing to do is to
list all the classes and make an inheritance tree showing what the
various subclasses are. Fortunately, this has already been done for
the 4.0 VM - take a look at the vm/memory/types.h file.

We can see:
  - the oop hierarchy (20 types) which represent the various "object
    oriented pointers" used in the system
  - the map hierarchy (27 types) which are the invisible meta-objects
    used in Self. They are the link to the C++ world and also serve
    as the system's notion of "type".
  - the memory hierarchy (20 types) which together organize space
    allocation
  - slots (2 types) this is what objects are made of
  - frames (4 types) allow access to the execution stack
  - misc (6 types) processes and stuff
  - lookups (12 types) the compilers need this for message sends
  - dependency (2 types) allows selective recompilation when the
    programmer changes something
  - code (9 types) the output of the compilers
  - various helper (16 types)
  - scanner (5 types) to convert Self source to bytecodes
  - statistics (4 types)
  - function types (10 types)
  - compiler classes (7 types) the compilers themselves
  - SIC classes (54 types) all of the temporary structures that the
    Simple Inlining Compiler builds up as it looks through the code 
  - globals (3 types)

The next step is to look through the code and see what groups of
classes are used together (what "frameworks" are part of the system).
I haven't done this and it would be pretty long anyway. Understanding
the Self VM is far from trivial, and porting to another machine is
even harder. But it is certainly worth the effort.

-- Jecel

______________________________________________________________________
NextCard Internet VISA -- 2.9% intro APR
Earn free airline tickets WITH DOUBLE Rew at rds points. 
http://ads.egroups.com/click/61/0/nextcard

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