4.4BSD/usr/src/old/lisp/pearl/template

 TTTTTTTTT  EEEEEEE  M	   M   PPPPP   L	 AA    TTTTTTTTT  EEEEEEE
     T	    E	     MM   MM   P    P  L	A  A	   T	  E
     T	    EEEEE    M M M M   PPPPP   L       AAAAAA	   T	  EEEEE
     T	    E	     M	M  M   P       L       A    A	   T	  E
     T	    EEEEEEE  M	   M   P       LLLLLL  A    A	   T	  EEEEEEE
 
    Structure Definition Information Template
 
    Header
    ||=========================================||
    ||	0   unique number	   (integer)   ||
    ||	1   *pearldefinition* tag  (atom ptr)  ||
    ||	2   length		   (integer)   ||
    ||	3   default instance	   (core ptr)  ||
    ||	4   isa 		   (core ptr)  ||
    ||	5   print name		   (atom ptr)  ||
    ||	6   hash alias		   (integer)   ||
    ||	7   hash focus		   (integer)   ||
    ||	8   expansion list	   (list ptr)  ||
    ||	9   base hooks		   (lisp ptr)  ||
    ||=========================================||
 
    and for each slot (multiply slot number by 4 and add):
    ||=========================================||
    ||	+6  free (28)! enforce (1) ! hash (6)  ||
    ||	+7  type number 	   (integer)   ||
    ||	+8  slot print name	   (atom ptr)  ||
    ||	+9  pp set info 	   (atom ptr)  ||
    ||=========================================||
 
 
 
 
    Structure Instance Template
 
    Header
    ||=========================================||
    ||	0   definition		   (core ptr)  ||
    ||	1   *pearlinst* tag        (atom ptr)  ||
    ||	2   a-list and alist copy  (conscell)  ||
    ||	3   abbreviation           (atom ptr)  ||
    ||=========================================||
 
    and for each slot (multiply slot number by 4 and add):
    ||=========================================||
    ||	+0  value type             (integer)   ||
    ||	+1  value         	   ( ? ptr)    ||
    ||	+2  predicate list	   (list ptr)  ||
    ||	+3  slothook list 	   (list ptr)  ||
    ||=========================================||
 
 
 
    symbol template
 
    ||=========================================||
    ||	0   unique number	   (integer)   ||
    ||	1   *pearlsymbol* tag      (atom ptr)  ||
    ||	2   print name		   (atom ptr)  ||
    ||=========================================||
 
 
 
    data bases
 
    header
    ||=========================================||
    ||	0   name		   (atom ptr)  ||
    ||	1   *pearldb* tag	   (atom ptr)  ||
    ||	2   children		   (lisp ptr)  ||
    ||	3   active		   (t or nil)  ||
    ||	4   parent		   (lisp ptr)  ||
    ||	5   db1 		   (core ptr)  ||
    ||	6   db2 		   (core ptr)  ||
    ||=========================================||
 
    and for each hash slot i (a small 1 hash db and then a large 2/3 hash db):
    ||=========================================||
    ||	i   hash bucket 	   (lisp ptr)  ||
    ||=========================================||
 

    block template (3 cons-cells)
 
    b:Name ---+
              |
    ||========V================================||
    || Name        (atom)  | ptr to vars part  ||
    ||==========================|==============||
                                |
		    ||==========V==============================||
         Name --->  || ptr to 2nd conscell | ptr to free vars  ||
		    ||==========|==============================||
				|
		    ||==========V==============================||
		    || ptr to frozen vars  | *pearlunbound*    ||
		    ||=========================================||