*** empty log message ***
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 2 Feb 1987 15:22:44 +0000 (15:22 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 2 Feb 1987 15:22:44 +0000 (15:22 +0000)
v7/src/microcode/boot.c
v7/src/microcode/daemon.c
v7/src/microcode/errors.h
v7/src/microcode/fixobj.h
v7/src/microcode/storage.c
v7/src/microcode/utabmd.scm
v7/src/microcode/utils.c
v7/src/microcode/version.h
v8/src/microcode/fixobj.h
v8/src/microcode/utabmd.scm
v8/src/microcode/version.h

index b71ddd0c5f187eda88d651683e64c099cfe72216..01737a64b4f3aa79c6761419cf6835238255f133 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 \f
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.21 1987/01/22 14:17:17 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.22 1987/02/02 15:17:52 jinx Exp $
  *
  * This file contains the code to support startup of
  * the SCHEME interpreter.
@@ -348,7 +348,6 @@ int Our_Heap_Size, Our_Stack_Size, Our_Constant_Size;
   User_Vector_Set(Fixed_Objects, System_Interrupt_Vector, Int_Vec);    \
   User_Vector_Set(Fixed_Objects, System_Error_Vector, Error);          \
   User_Vector_Set(Fixed_Objects, OBArray, OB_Array);                   \
-  User_Vector_Set(Fixed_Objects, Hash_Number, FIXNUM_0);               \
   User_Vector_Set(Fixed_Objects, Dummy_History,                                \
                   Make_Pointer(TC_HUNK3, Dummy_Hist));                 \
   User_Vector_Set(Fixed_Objects, State_Space_Tag, TRUTH);              \
index aea9c1a16b65f1904bc5f811e60f4c2feed880d6..a9e3e1cd85dd54a1f6b37c5859d3c844fe8bf6a6 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/daemon.c,v 9.21 1987/01/22 14:22:56 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/daemon.c,v 9.22 1987/02/02 15:16:12 jinx Exp $
 
    This file contains code for the Garbage Collection daemons.
    There are currently two daemons, one for closing files which
@@ -38,367 +38,134 @@ MIT in each case. */
    hash tables where entries disappear when the corresponding
    object is released due to GC.
 
+   Both of these daemons should be written in Scheme, but since the
+   interpreter conses while executing Scheme programs, they are
+   unsafe.  The Scheme versions actually exist, but are commented out
+   of the appropriate runtime system sources.
 */
 
 #include "scheme.h"
 #include "primitive.h"
-#include "gccode.h"
 \f
-/* Hash Tables
-
-   The hash table support here allows the Scheme runtime system to
-   support "populations."  A population is conceptually a set of
-   items, but with the special property that an item remains in the
-   population only as long as the object would remain in the system
-   were it not in the set.  That is, an item is removed from all
-   populations it belongs to when a garbage collection removes the
-   item from the system.
-
-   The actual support provided is a pair of hash tables.  An object
-   can be hashed to yield the current value of a constantly
-   incrementing counter.  The hash table is constructed by hashing on
-   the address of the object, and both the item and the unique number
-   assigned to it are stored in the table.  The unhash table is
-   constructed by hashing on the unique number and again storing both
-   the item and its unique number.  Both the hash and unhash tables
-   appear to the user to be vectors, but they have a NON_MARKED header
-   so that the ordinary GC will not update pointers located within
-   them.
-
-   At every GC flip (i.e. after all objects have been moved from old
-   space to new space, but before the Scheme code runs again), the
-   Rehash Daemon is called.  It goes through the hash table (all of
-   which points into old space) and reconstructs it.  Whenever it
-   finds a non-pointer object or an object which points at a BROKEN
-   HEART (i.e. one which the GC copied into new space) it rehashes the
-   new address and adds it to the new table.
-
-   Thus, the hash tables provide a mapping from objects to unique
-   numbers, with the additional property that the table does not
-   retain objects that the garbage collector would otherwise release
-   from the system.
-
+/* (CLOSE-LOST-OPEN-FILES file-list) 
+   file-list is an assq-like list where the associations are weak
+   pairs rather than normal pairs.  This primitive destructively
+   removes those weak pairs whose cars are #F, and closes the
+   corresponding file descriptor contained in the cdrs. See io.scm in
+   the runtime system for a longer description.
 */
 
-#define Hash_It(P)                     \
-       (((Datum(P)>>16)&0xFF)+ \
-         ((Datum(P)>>8)&0xFF)+ \
-         (Datum(P) & 0xFF))
+extern Boolean OS_file_close();
 
-Pointer The_Hash_Table, The_Unhash_Table;
-long HASH_TABLE_SIZE;
-\f
-/* (INITIALIZE-OBJECT-HASH FIXNUM)
-      [Primitive number 0x8A]
-      Resets the unique ID generator used in the 2-dimensional hash
-      tables which implement properties and populations.  The value of
-      FIXNUM will be used for the next object put into the hash
-      tables.
-*/
-Built_In_Primitive(Prim_Initialize_Object_Hash, 1, "INITIALIZE-OBJECT-HASH")
-{ fast long i;
-  long Length;
+Built_In_Primitive(Prim_Close_Lost_Open_Files, 1, "CLOSE-LOST-OPEN-FILES")
+{ fast Pointer *Smash, Cell, Weak_Cell;
   Primitive_1_Arg();
-  Arg_1_Type(TC_FIXNUM);
-  HASH_TABLE_SIZE = Get_Integer(Arg1);
-  Length = 8 + (2 * HASH_TABLE_SIZE);
-  if (!Test_Pure_Space_Top(Free_Constant + Length))
-  { Update_FObj_Slot(Hash_Table, NIL);
-    Update_FObj_Slot(Unhash_Table, NIL);
-    return NIL;
-  }
-
-/* Make a Constant/Pure block to hold the two vectors */
-
-/* Constant part header */
-  *Free_Constant++ = Make_Non_Pointer(TC_MANIFEST_SPECIAL_NM_VECTOR, Length-3);
-  *Free_Constant++ = Make_Non_Pointer(PURE_PART, Length-1);
 
-/* Constant part contains hash and unhash tables */
-  Update_FObj_Slot(Hash_Table, Make_Pointer(TC_VECTOR, Free_Constant));
-  *Free_Constant++ = Make_Non_Pointer(TC_MANIFEST_VECTOR, HASH_TABLE_SIZE);
-  for (i=0; i < HASH_TABLE_SIZE; i++) *Free_Constant++ = NIL;
-  Update_FObj_Slot(Unhash_Table, Make_Pointer(TC_VECTOR, Free_Constant));
-  *Free_Constant++ = Make_Non_Pointer(TC_MANIFEST_VECTOR, HASH_TABLE_SIZE);
-  for (i=0; i < HASH_TABLE_SIZE; i++) *Free_Constant++ = NIL;
-
-/* Pure part header */
-  *Free_Constant++ = Make_Non_Pointer(TC_MANIFEST_SPECIAL_NM_VECTOR, 1);
-  *Free_Constant++ = Make_Non_Pointer(CONSTANT_PART, Length-3);
-
-/* Block trailer */
-  *Free_Constant++ = Make_Non_Pointer(TC_MANIFEST_SPECIAL_NM_VECTOR, 1);
-  *Free_Constant++ = Make_Non_Pointer(END_OF_BLOCK, Length-1);
-  Update_FObj_Slot(Hash_Number, FIXNUM_0);
-  Set_Pure_Top();
-  return NIL;
-}
-\f
-Pointer Hash_One_Object(Object, New_Unique_ID, Update_UID_Count)
-Pointer Object, New_Unique_ID;
-Boolean Update_UID_Count;
-{ Pointer Bucket;
-  long UID_Hash, Obj_Hash;
-
-  Obj_Hash = Hash_It(Object) % HASH_TABLE_SIZE + 1;
-  Bucket = Vector_Ref(The_Hash_Table, Obj_Hash);
-  while (Type_Code(Bucket) == TC_LIST)
-  { Pointer This_Entry;
-    This_Entry = Vector_Ref(Bucket, CONS_CAR);
-    if (Vector_Ref(This_Entry, CONS_CAR) == Object)
-      return Vector_Ref(This_Entry, CONS_CDR);
-    Bucket = Vector_Ref(Bucket, CONS_CDR);
+  for (Smash = Nth_Vector_Loc(Arg1, CONS_CDR), Cell = *Smash;
+       Cell != NIL;
+       Cell = *Smash)
+  { Weak_Cell = Fast_Vector_Ref(Cell, CONS_CAR);
+    if (Fast_Vector_Ref(Weak_Cell, CONS_CAR) == NIL)
+    { (void)
+       OS_file_close
+         (Channels[Get_Integer(Fast_Vector_Ref(Weak_Cell, CONS_CDR))]);
+      *Smash = Fast_Vector_Ref(Cell, CONS_CDR);
+    }
+    else
+      Smash = Nth_Vector_Loc(Cell, CONS_CDR);
   }
-  Primitive_GC_If_Needed(6);
-  UID_Hash = Hash_It(New_Unique_ID) % HASH_TABLE_SIZE + 1;
-
-  Free[CONS_CAR] = Make_Pointer(TC_LIST, Free+2);
-  Free[CONS_CDR] = Vector_Ref(The_Hash_Table, Obj_Hash);
-  Vector_Set(The_Hash_Table, Obj_Hash, Make_Pointer(TC_LIST, Free));
-  Free += 2;
-
-  Free[CONS_CAR] = Object;
-  Free[CONS_CDR] = New_Unique_ID;
-  Free += 2;
-
-  Free[CONS_CAR] = Make_Pointer(TC_LIST, Free-2);
-  Free[CONS_CDR] = Vector_Ref(The_Unhash_Table, UID_Hash);
-  Vector_Set(The_Unhash_Table, UID_Hash, Make_Pointer(TC_LIST, Free));
-  Free += 2;
-  if (Update_UID_Count)
-    Update_FObj_Slot(Hash_Number, FIXNUM_0+1+Get_Integer(New_Unique_ID));
-  return New_Unique_ID;
+  return TRUTH;
 }
 \f
-/* (OBJECT-HASH OBJECT)
-      [Primitive number 0x5A]
-      Returns the unique hash number associated with OBJECT.  This is
-      used in the implementation of property lists and populations.
-*/
-Built_In_Primitive(Prim_Object_Hash, 1, "OBJECT-HASH")
-{ Primitive_1_Arg();
+/* Utilities for the rehash daemon below */
 
-  The_Hash_Table = Get_Fixed_Obj_Slot(Hash_Table);
-  The_Unhash_Table = Get_Fixed_Obj_Slot(Unhash_Table);
-  if (The_Hash_Table==NIL) Primitive_Error(ERR_NO_HASH_TABLE);
-  HASH_TABLE_SIZE = Vector_Length(The_Unhash_Table);
-  return Hash_One_Object(Arg1, Get_Fixed_Obj_Slot(Hash_Number), true);
-}
-\f
-/* (OBJECT_UNHASH NUMBER)
-      [Primitive number 0x5B]
-      Returns the object associated with a hash number (ie the inverse
-      operation of OBJECT_HASH).  Returns NIL if there is no
-      associated object (which will occur if no object was ever hashed
-      to this value, or if that object has been removed by a garbage
-      collection, since these hash table are explicitly built in order
-      NOT to retain objects which would otherwise disappear.)
+/* This runs with GC locked, being part of a GC daemon.
+   It is also the case that the storage needed by this daemon is
+   available, since it was all reclaimed by the immediately preceeding
+   garbage collection, and at most that much is allocated now.
+   Therefore, there is no gc check here.
 */
-Built_In_Primitive(Prim_Object_Unhash, 1, "OBJECT-UNHASH")
-{ long Obj_Hash;
-  Pointer Bucket;
-  Primitive_1_Arg();
 
-  Arg_1_Type(TC_FIXNUM);
-  The_Unhash_Table = Get_Fixed_Obj_Slot(Unhash_Table);
-  if (The_Unhash_Table==NIL) Primitive_Error(ERR_NO_HASH_TABLE);
-  HASH_TABLE_SIZE = Vector_Length(The_Unhash_Table);
-  Obj_Hash = Hash_It(Arg1) % HASH_TABLE_SIZE + 1;
-  Bucket = Vector_Ref(The_Unhash_Table, Obj_Hash);
-  while (Type_Code(Bucket) == TC_LIST)
-  { Pointer Entry;
-    Entry = Vector_Ref(Bucket, CONS_CAR);
-    if (Arg1 == Vector_Ref(Entry, CONS_CDR))
-      return Vector_Ref(Entry, CONS_CAR);
-    Bucket = Vector_Ref(Bucket, CONS_CDR);
-  }
-  return NIL;
+void
+rehash_pair(pair, hash_table, table_size)
+Pointer pair, hash_table;
+long table_size;
+{ long object_datum, hash_address;
+  Pointer *new_pair;
+
+  object_datum = Datum(Fast_Vector_Ref(pair, CONS_CAR));
+  hash_address = 2+(object_datum % table_size);
+  new_pair = Free;
+  *Free++ = Make_New_Pointer(TC_LIST, pair);
+  *Free++ = Fast_Vector_Ref(hash_table, hash_address);
+  Fast_Vector_Set(hash_table,
+                 hash_address,
+                 Make_Pointer(TC_LIST, new_pair));
+  return;
 }
-\f
-/* (REHASH_GC_DAEMON)
-      [Primitive number 0x5C]
-      Used only immediately after a GC, this primitive creates a new
-      pair of hash tables for use with the property list and
-      population mechanisms.  It depends on the broken hearts left by
-      the previous GC.
-*/
-Built_In_Primitive(Prim_Rehash_Gc_Daemon, 0, "REHASH-GC-DAEMON")
-{ fast Pointer Chain;
-  Primitive_0_Args();
-
-  The_Hash_Table = Get_Fixed_Obj_Slot(Hash_Table);
-  The_Unhash_Table = Get_Fixed_Obj_Slot(Unhash_Table);
-  if (The_Hash_Table == NIL) return NIL;
-  HASH_TABLE_SIZE = Vector_Length(The_Unhash_Table);
-  Chain = NIL;
-
-/* Create a single chain of all the entries from the hash table ...
-   clear both the hash and unhash tables on the way */
-
-  { fast Pointer Chain_End, Bucket;
-    fast long i;
-    Chain_End = NIL;
 
-    for (i=1; i <= HASH_TABLE_SIZE; i++)
-    { Fast_Vector_Set(The_Unhash_Table, i, NIL);
-      Bucket = Fast_Vector_Ref(The_Hash_Table, i);
-      if (Bucket != NIL)
-      { if (Chain==NIL) Chain = Bucket;
-       else Fast_Vector_Set(Chain_End, CONS_CDR, Bucket);
-       while (Fast_Vector_Ref(Bucket, CONS_CDR) != NIL)
-         Bucket = Fast_Vector_Ref(Bucket, CONS_CDR);
-       Chain_End = Bucket;
-       Fast_Vector_Set(The_Hash_Table, i, NIL);
-      }
+void
+rehash_bucket(bucket, hash_table, table_size)
+Pointer *bucket, hash_table;
+long table_size;
+{ fast Pointer weak_pair;
+  while (*bucket != NIL)
+  { weak_pair = Fast_Vector_Ref(*bucket, CONS_CAR);
+    if (Fast_Vector_Ref(weak_pair, CONS_CAR) != NIL)
+    { rehash_pair(weak_pair, hash_table, table_size);
     }
+    bucket = Nth_Vector_Loc(*bucket, CONS_CDR);
   }
-  
-/* Prim_Rehash_Gc_Daemon continues on the next page */
-\f
-/* Prim_Rehash_Gc_Daemon, continued */
-
-/* Walk the chain rehashing entries that have been relocated */
-
-  { fast Pointer *Scan, Temp, *Old, *Low_Constant;
-    Low_Constant = Constant_Space;
-    while (Chain != NIL)
-    { Scan = Get_Pointer(Fast_Vector_Ref(Chain, CONS_CAR));
-      Chain = Fast_Vector_Ref(Chain, CONS_CDR);
-      Temp = *Scan;
-      switch(GC_Type(Temp))
-      { case GC_Non_Pointer:
-         Hash_One_Object(Temp, Scan[1], false);
-         continue;
-
-#define Rehash_An_Object(obj) Hash_One_Object(obj, Scan[1], false)
-
-       case GC_Cell:
-       case GC_Pair:
-       case GC_Triple:
-       case GC_Quadruple:
-       case GC_Vector:
-         Old = Get_Pointer(Temp);
-         if (Old >= Low_Constant)
-         { Rehash_An_Object(Temp);
-           continue;
-         }
-         Normal_BH(false, Rehash_An_Object(*Scan));
-         continue;
-
-       case GC_Compiled:
-         Old = Get_Pointer(Temp);
-         if (Old >= Low_Constant)
-         { Rehash_An_Object(Temp);
-           continue;
-         }
-         Compiled_BH(false, Rehash_An_Object(*Scan));
-         continue;
+  return;
+}
 
-       case GC_Special:
-       case GC_Undefined:
-       default:
-         fprintf(stderr,
-                 "\nRehash-GC-Daemon: Bad Object: Type = 0x%02x; Datum = %x\n",
-                 Type_Code(Temp), Datum(Temp));
-         Microcode_Termination(TERM_INVALID_TYPE_CODE);
-       }
+void
+splice_and_rehash_bucket(bucket, hash_table, table_size)
+Pointer *bucket, hash_table;
+long table_size;
+{ fast Pointer weak_pair;
+  while (*bucket != NIL)
+  { weak_pair = Fast_Vector_Ref(*bucket, CONS_CAR);
+    if (Fast_Vector_Ref(weak_pair, CONS_CAR) != NIL)
+    { rehash_pair(weak_pair, hash_table, table_size);
+      bucket = Nth_Vector_Loc(*bucket, CONS_CDR);
+    }
+    else
+    { *bucket = Fast_Vector_Ref(*bucket, CONS_CDR);
     }
   }
-  return TRUTH;
+  return;
 }
 \f
-/* The format of the open files vector is:
-
-        |----------------|--------|
-        |MANIFEST_VECTOR |    n   |
-        |----------------|--------|.
-        |FIXNUM          |    m   | .    n = length of the vector
-        |----------------|--------| |    m = count of used slots
-   Lock |NULL or NM_VECT |   n-2  | |
-       .|----------------|--------| |    HUNK3s are formatted:
-      . |HUNK3           |   ----------> |--------------------|
-      | |----------------|--------| |    |   Channel number   |
-      | |HUNK3           |        | |    |--------------------|
-      | |----------------|--------| |    |      File Name     |
-   m <  |HUNK3           |        |  > n |--------------------|
-      | |----------------|--------| |    |   Input or Output  |
-      | |HUNK3           |        | |    |--------------------|
-      | |----------------|--------| |
-      . |   ...          |        | |    If the type code of Lock
-       .|----------------|--------| |    is NULL, then the vector
-        |  ---UNUSED---  |        | |    is in use by SCHEME and
-        |----------------|--------| |    cannot be accessed here.
-        |   ...          |        | .
-        |----------------|--------|.
- */
+/* (REHASH unhash-table hash-table)
+   Cleans up and recomputes hash-table from the valid information in
+   unhash-table after a garbage collection.
+   See hash.scm in the runtime system for a description.
+*/
 
-#define OPEN_FILES_COUNT       1
-#define OPEN_FILES_INTERLOCK   2
-#define OPEN_FILES_FIRST_FILE  3
+Built_In_Primitive(Prim_Rehash, 2, "REHASH")
+{ long table_size, counter;
+  Pointer *bucket;
+  Primitive_2_Args();
 
-#define FILE_CHANNEL           0
-#define FILE_NAME              1
-#define FILE_IN_OR_OUT         2
-\f
-/* (CLOSE_LOST_OPEN_FILES)
-      [Primitive number 0xC7]
-      This primitive can ONLY be called as one of the GC daemons.  It
-      is responsible for closing and releasing any files which have
-      "disappeared" due to a garbage collection.  It relies on the
-      broken hearts left behind by the GC to do its work.
+  table_size = Vector_Length(Arg1);
 
-      Note that it depends on the fact that file blocks are hunk3s in
-      the following way: The broken heart left around is in the first
-      word of the old space copy of the file block.
-*/
-Built_In_Primitive(Prim_Close_Lost_Open_Files, 0, "CLOSE-LOST-OPEN-FILES")
-{ Pointer Open_Files_Vector, *From_File, *To_File;
-  long i, NFiles, Orig_Count;
-  Primitive_0_Args();
-  /* Close_Lost_Open_Files walks down the used entries of the
-     Open Files Vector.  For each entry, it either relocates it (if
-     the Garbage Collector provided a forwarding address) or it closes
-     the file and removes the entry from the vector.
-  */
-  Open_Files_Vector = Get_Fixed_Obj_Slot(Open_Files);
-  if ((Open_Files_Vector==NIL) ||
-      (Type_Code(Vector_Ref(Open_Files_Vector,
-                            OPEN_FILES_INTERLOCK)) ==
-       TC_NULL)) return NIL;
-  Orig_Count = Get_Integer(Vector_Ref(Open_Files_Vector,
-                                      OPEN_FILES_COUNT));
-  NFiles = Orig_Count;
-  To_File = Nth_Vector_Loc(Open_Files_Vector, OPEN_FILES_FIRST_FILE);
+  /* First cleanup the hash table */
+  for (counter = table_size, bucket = Nth_Vector_Loc(Arg2, 2);
+       --counter >= 0;)
+    *bucket++ = NIL;
 
-/* Prim_Close_Lost_Open_Files continues on next page */
-\f
-/* Prim_Close_Lost_Open_Files, continued */
+  /* Now rehash all the entries from the unhash table and maybe splice
+     the buckets. */
 
-  for (i=0, From_File=To_File; i < Orig_Count; i++, From_File++)
-  { if (Type_Code(*Get_Pointer(*From_File))==TC_BROKEN_HEART)
-    { /* The file block (hunk3) has been moved by the GC which just
-         ended.  Relocate the pointer in the Open Files Vector. */
-      Store_Address(*To_File, Datum(*Get_Pointer(*From_File)));
-      To_File += 1;
-    }
+  for (counter = table_size, bucket = Nth_Vector_Loc(Arg1, 1);
+       --counter >= 0;
+       bucket += 1)
+  { if (Fast_Vector_Ref(*bucket, CONS_CAR) == TRUTH)
+      splice_and_rehash_bucket(Nth_Vector_Loc(*bucket, CONS_CDR), Arg2, table_size);
     else
-    { if (Get_Pointer(*From_File) > Constant_Space)
-      { Store_Address(*To_File, Datum(*From_File));
-        To_File += 1;
-      }
-      else
-      { /* The file is no longer accessible, since its file block
-           was not relocated by the GC. Close the file and shrink the
-           Open Files Vector */
-        long File_Number;
-        File_Number = Get_Integer(Vector_Ref(*From_File, FILE_CHANNEL));
-        fclose(Channels[File_Number]);
-        Channels[File_Number] = NULL;
-        NFiles -= 1;
-      }
-    }
+      rehash_bucket(Nth_Vector_Loc(*bucket, CONS_CDR), Arg2, table_size);
   }
-  for (i=NFiles; i < Orig_Count; i++) *To_File++ = NIL;
-  Vector_Set(Open_Files_Vector, OPEN_FILES_COUNT, FIXNUM_0+NFiles);
+
   return TRUTH;
 }
index 9b6523f6efa008bd94ec766904721675977f15c1..020df5f28322802caad0de369e2559a9f2f06dee 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/errors.h,v 9.21 1987/01/22 14:23:37 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/errors.h,v 9.22 1987/02/02 15:18:06 jinx Exp $
  *
  * Error and termination code declarations.  This must correspond
  * to UTABMD.SCM
@@ -46,7 +46,7 @@ MIT in each case. */
 #define ERR_UNBOUND_VARIABLE                   0x01
 #define ERR_UNASSIGNED_VARIABLE                        0x02
 #define ERR_INAPPLICABLE_OBJECT                        0x03
-#define ERR_OUT_OF_HASH_NUMBERS                        0x04 /* Not generated */
+/* #define ERR_OUT_OF_HASH_NUMBERS             0x04 */
 /* #define ERR_ENVIRONMENT_CHAIN_TOO_DEEP      0x05 */
 #define ERR_BAD_FRAME                          0x06
 #define ERR_BROKEN_COMPILED_VARIABLE           0x07
@@ -72,7 +72,7 @@ MIT in each case. */
 /* The following do not exist in the 68000 version */
 #define ERR_WRITE_INTO_PURE_SPACE              0x1A
 /* #define ERR_LOSING_SPARE_HEAP               0x1B */
-#define ERR_NO_HASH_TABLE                      0x1C
+/* #define ERR_NO_HASH_TABLE                   0x1C */
 #define ERR_BAD_SET                             0x1D
 #define ERR_ARG_1_FAILED_COERCION                      0x1E
 #define ERR_ARG_2_FAILED_COERCION                      0x1F
index 17d0e554137d2bfecff86ff6a3319e1440e8e391..6a22f6cb8f528e70be2567615ee262c720c8958b 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/fixobj.h,v 9.21 1987/01/22 14:25:31 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/fixobj.h,v 9.22 1987/02/02 15:16:55 jinx Exp $
  *
  * Declarations of user offsets into the Fixed Objects Vector.
  * This should correspond to the file UTABMD.SCM
@@ -44,12 +44,8 @@ MIT in each case. */
 #define Returns_Vector         0x05    /* Return code -> Name map */
 #define Primitives_Vector      0x06    /* Primitive code -> Name map */
 #define Errors_Vector          0x07    /* Error code -> Name map */
-#define Hash_Number            0x08    /* Next number for hashing */
-#define Hash_Table             0x09    /* Table for hashing objects */
-#define Unhash_Table           0x0A    /* Inverse hash table */
 #define GC_Daemon              0x0B    /* Procedure to run after GC */
 #define Trap_Handler           0x0C    /* Continue after disaster */
-#define Open_Files             0x0D    /* List of open files */
 #define Stepper_State          0x0E    /* NOT IMPLEMENTED YET */
 #define Fixed_Objects_Slots    0x0F    /* Names of these slots */
 #define External_Primitives    0x10    /* Names of external prims */
index a08108e2e0858c99a4b343ab7fad25ec2e63e8ea..6716a22cfa1fa940ae1d6c45c56ede940253b446 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/storage.c,v 9.21 1987/01/22 14:32:38 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/storage.c,v 9.22 1987/02/02 15:17:19 jinx Exp $
 
 This file defines the storage for global variables for
 the Scheme Interpreter. */
@@ -251,9 +251,9 @@ char Arg_Count_Table[] = {
 /* 057 */ (char) 1, /* BINARY-FASLOAD */
 /* 058 */ (char) 3, /* STRING-POSITION */
 /* 059 */ (char) 2, /* STRING-LESS? */
-/* 05A */ (char) 1, /* OBJECT-HASH */
-/* 05B */ (char) 1, /* OBJECT-UNHASH */
-/* 05C */ (char) 0, /* GC-REHASH-DAEMON */
+/* 05A */ (char) 0, /* unused */
+/* 05B */ (char) 0, /* unused */
+/* 05C */ (char) 2, /* REHASH */
 /* 05D */ (char) 1, /* LENGTH */
 /* 05E */ (char) 2, /* ASSQ */
 /* 05F */ (char) 1, /* BUILD-STRING-FROM-LIST */
@@ -304,7 +304,7 @@ char Arg_Count_Table[] = {
 /* 087 */ (char) 1, /* Sys-PAIR-CDR */
 /* 088 */ (char) 2, /* Sys-PAIR-SET!-CAR */
 /* 089 */ (char) 2, /* Sys-PAIR-SET!-CDR */
-/* 08A */ (char) 1, /* INITIALIZE-OBJECT-HASH */
+/* 08A */ (char) 0, /* unused */
 /* 08B */ (char) 1, /* GET-CHARACTER-IMMEDIATE */
 /* 08C */ (char) 2, /* SET-CONTENTS! */
 /* 08D */ (char) 2, /* &MAKE-OBJECT */
@@ -370,7 +370,7 @@ char Arg_Count_Table[] = {
 /* 0C4 */ (char) 1, /* FILE-LENGTH */
 /* 0C5 */ (char) 2, /* FILE-WRITE-CHAR */
 /* 0C6 */ (char) 2, /* FILE-WRITE-STRING */
-/* 0C7 */ (char) 0, /* CLOSE-LOST-OPEN-FILES */
+/* 0C7 */ (char) 1, /* CLOSE-LOST-OPEN-FILES */
 /* 0C8 */ (char) 2, /* PUT-CHARACTER-TO-OUTPUT-CHANNEL */
 
 /* Argument Count Table continues on next page */
@@ -664,7 +664,6 @@ extern Pointer
   Prim_Greater_Fixnum(), Prim_Greater_Flonum(),
   Prim_Hunk3_Cons(), Prim_Hunk3_Cxr(), Prim_Hunk3_Set_Cxr(),
   Prim_Impurify(), Prim_Init_Floppy(),
-  Prim_Initialize_Object_Hash(),
   Prim_Ins_BStr(), Prim_Ins_BStr_Excl(),
   Prim_Insert_Non_Marked_Vector(), Prim_Insert_String(),
   Prim_Int_To_Float(), Prim_Integer_Divide(),
@@ -698,7 +697,6 @@ extern Pointer
   Prim_Negative_Flonum(), Prim_Next_File(),
   Prim_Non_Marked_Vector_Cons(), Prim_Non_Reentrant_Catch(),
   Prim_Non_Restartable_Exit(), Prim_Null(),
-  Prim_Object_Hash(), Prim_Object_Unhash(), 
   Prim_One_Plus(), Prim_One_Plus_Fixnum(),
   Prim_Open_Catalog(),
   Prim_Overwrite_String(), Prim_Pack_Volume(),
@@ -712,7 +710,7 @@ extern Pointer
   Prim_Prim_Type_QM(), Prim_Print_String(), Prim_Pure_P(),
   Prim_Put_Char_To_Output_Channel(),
   Prim_Raise_Char(), Prim_Raise_String(),
-  Prim_Rehash_Gc_Daemon(),
+  Prim_Rehash(),
   Prim_Remove_File(), Prim_Rename_File(),
   Prim_Restartable_Exit(), Prim_Return_Step(),
   Prim_Round(),
@@ -983,9 +981,9 @@ Pointer (*(Primitive_Table[]))() = {
 /* 057 */ Prim_Binary_Fasload,
 /* 058 */ Prim_String_Position,
 /* 059 */ Prim_String_Less,
-/* 05A */ Prim_Object_Hash,
-/* 05B */ Prim_Object_Unhash,
-/* 05C */ Prim_Rehash_Gc_Daemon,
+/* 05A */ Prim_Unused,
+/* 05B */ Prim_Unused,
+/* 05C */ Prim_Rehash,
 /* 05D */ Prim_Length,
 /* 05E */ Prim_Assq,
 /* 05F */ Prim_Build_String_From_List,
@@ -1036,7 +1034,7 @@ Pointer (*(Primitive_Table[]))() = {
 /* 087 */ Prim_Sys_Pair_Cdr,
 /* 088 */ Prim_Sys_Set_Car,
 /* 089 */ Prim_Sys_Set_Cdr,
-/* 08A */ Prim_Initialize_Object_Hash,
+/* 08A */ Prim_Unused,
 /* 08B */ Prim_Get_Char_Immediate,
 /* 08C */ Prim_Set_Cell_Contents,
 /* 08D */ Prim_And_Make_Object,
@@ -1445,9 +1443,9 @@ char *Primitive_Names[] = {
 /* 0x57 in fasload */  "BINARY-FASLOAD",
 /* 0x58 in string */   "STRING-POSITION",
 /* 0x59 in string */   "STRING-LESS?",
-/* 0x5A in daemon */   "OBJECT-HASH",
-/* 0x5B in daemon */   "OBJECT-UNHASH",
-/* 0x5C in daemon */   "REHASH-GC-DAEMON",
+/* 0x5A not here */    No_Name,
+/* 0x5B not here */    No_Name,
+/* 0x5C in daemon */   "REHASH",
 /* 0x5D in list */     "LENGTH",
 /* 0x5E in list */     "ASSQ",
 /* 0x5F in string */   "LIST->STRING",
@@ -1498,7 +1496,7 @@ char *Primitive_Names[] = {
 /* 0x87 in list */     "SYSTEM-PAIR-CDR",
 /* 0x88 in list */     "SYSTEM-PAIR-SET-CAR!",
 /* 0x89 in list */     "SYSTEM-PAIR-SET-CDR!",
-/* 0x8A in daemon */   "INITIALIZE-OBJECT-HASH",
+/* 0x8A not here */    No_Name,
 /* 0x8B in io */       "GET-CHARACTER-FROM-INPUT-CHANNEL-IMMEDIATE",
 /* 0x8C in prim */     "SET-CELL-CONTENTS!",
 /* 0x8D in prim */     "&MAKE-OBJECT",
index 26bf9e1e25f483b18757480affebe59513d526cb..87f050880d97c0b77a245f1e2a79bbe2feac33af 100644 (file)
@@ -37,7 +37,7 @@
 
 ;;;; Machine Dependent Type Tables
 
-;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utabmd.scm,v 9.20 1987/01/21 20:29:40 jinx Exp $
+;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utabmd.scm,v 9.21 1987/02/02 15:16:36 jinx Exp $
 
 (declare (usual-integrations))
 
               MICROCODE-RETURNS-VECTOR                 ;05
               MICROCODE-PRIMITIVES-VECTOR              ;06
               MICROCODE-ERRORS-VECTOR                  ;07
-              HASH-NUMBER                              ;08
-              HASH-TABLE                               ;09
-              UNHASH-TABLE                             ;0A
+              #F                                       ;08
+              #F                                       ;09
+              #F                                       ;0A
               GC-DAEMON                                ;0B
               TRAP-HANDLER                             ;0C
-              OPEN-FILES                               ;0D
+              #F                                       ;0D
               STEPPER-STATE                            ;0E
               MICROCODE-FIXED-OBJECTS-SLOTS            ;0F
               MICROCODE-EXTERNAL-PRIMITIVES            ;10
               BINARY-FASLOAD                           ;$57
               STRING-POSITION                          ;$58
               STRING-LESS?                             ;$59
-              OBJECT-HASH                              ;$5A
-              OBJECT-UNHASH                            ;$5B
-              REHASH-GC-DAEMON                         ;$5C
+              #F                                       ;$5A
+              #F                                       ;$5B
+              REHASH                                   ;$5C
               LENGTH                                   ;$5D
               ASSQ                                     ;$5E
               LIST->STRING                             ;$5F
               SYSTEM-PAIR-CDR                          ;$87
               SYSTEM-PAIR-SET-CAR!                     ;$88
               SYSTEM-PAIR-SET-CDR!                     ;$89
-              INITIALIZE-OBJECT-HASH                   ;$8A
+              #F                                       ;$8A
               GET-CHARACTER-FROM-INPUT-CHANNEL-IMMEDIATE ;$8B
               SET-CELL-CONTENTS!                       ;$8C
               &MAKE-OBJECT                             ;$8D
               UNBOUND-VARIABLE                         ;01
               UNASSIGNED-VARIABLE                      ;02
               UNDEFINED-PROCEDURE                      ;03
-              RAN-OUT-OF-HASH-NUMBERS                  ;04
+              #F                                       ;04
               #F                                       ;05
               BAD-FRAME                                ;06
               BROKEN-CVARIABLE                         ;07
               IMPURIFY-OBJECT-TOO-LARGE                ;19
               WRITE-INTO-PURE-SPACE                    ;1A
               #F                                       ;1B
-              NO-HASH-TABLE                            ;1C
+              #F                                       ;1C
                ASSIGN-LAMBDA-NAME                      ;1D
               FAILED-ARG-1-COERCION                    ;1E
               FAILED-ARG-2-COERCION                    ;1F
 
 ;;; This identification string is saved by the system.
 
+"$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utabmd.scm,v 9.21 1987/02/02 15:16:36 jinx Exp $"
index 07c5497a566a385a5ecf4d7fde46b2bc70196707..2c919ae27842b9c8d6a7e1288bec2b8aa7132d95 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utils.c,v 9.20 1987/01/21 20:29:54 jinx Exp $ */
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/utils.c,v 9.21 1987/02/02 15:15:54 jinx Exp $ */
 
 /* This file contains utilities for interrupts, errors, etc. */
 
@@ -172,8 +172,6 @@ Err_Print (Micro_Error)
       printf("Not enough room to impurify object.\n"); break;
     case ERR_WRITE_INTO_PURE_SPACE:
       printf("Write into pure area\n"); break;
-    case ERR_NO_HASH_TABLE:
-      printf("No hash table installed.\n"); break;
     case ERR_BAD_SET:
       printf("Attempt to perform side-effect on 'self'.\n"); break;
     case ERR_ARG_1_FAILED_COERCION:
index f1b6ec57854624602dac41352930fc423d2c22d5..3c5e1ad6bbf616dd19f7c076b49dcb28f240e7b2 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 9.20 1987/01/21 20:30:25 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 9.21 1987/02/02 15:22:44 jinx Exp $
 
 This file contains version information for the microcode. */
 \f
@@ -46,7 +46,7 @@ This file contains version information for the microcode. */
 #define VERSION                9
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     20
+#define SUBVERSION     21
 #endif
 
 #ifndef UCODE_TABLES_FILENAME
index 78fb39ae049c0447d11e8c8fd09952c98fb809c1..146e0d92595fa2d784a2349e2a58a1701ee1c39c 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/fixobj.h,v 9.21 1987/01/22 14:25:31 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/fixobj.h,v 9.22 1987/02/02 15:16:55 jinx Exp $
  *
  * Declarations of user offsets into the Fixed Objects Vector.
  * This should correspond to the file UTABMD.SCM
@@ -44,12 +44,8 @@ MIT in each case. */
 #define Returns_Vector         0x05    /* Return code -> Name map */
 #define Primitives_Vector      0x06    /* Primitive code -> Name map */
 #define Errors_Vector          0x07    /* Error code -> Name map */
-#define Hash_Number            0x08    /* Next number for hashing */
-#define Hash_Table             0x09    /* Table for hashing objects */
-#define Unhash_Table           0x0A    /* Inverse hash table */
 #define GC_Daemon              0x0B    /* Procedure to run after GC */
 #define Trap_Handler           0x0C    /* Continue after disaster */
-#define Open_Files             0x0D    /* List of open files */
 #define Stepper_State          0x0E    /* NOT IMPLEMENTED YET */
 #define Fixed_Objects_Slots    0x0F    /* Names of these slots */
 #define External_Primitives    0x10    /* Names of external prims */
index ed6dfc8dca9f698addf5213304b781e427f9166d..46b1d741861809f596ef5abccda6cf2f25d6e421 100644 (file)
@@ -37,7 +37,7 @@
 
 ;;;; Machine Dependent Type Tables
 
-;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/utabmd.scm,v 9.20 1987/01/21 20:29:40 jinx Exp $
+;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/utabmd.scm,v 9.21 1987/02/02 15:16:36 jinx Exp $
 
 (declare (usual-integrations))
 
               MICROCODE-RETURNS-VECTOR                 ;05
               MICROCODE-PRIMITIVES-VECTOR              ;06
               MICROCODE-ERRORS-VECTOR                  ;07
-              HASH-NUMBER                              ;08
-              HASH-TABLE                               ;09
-              UNHASH-TABLE                             ;0A
+              #F                                       ;08
+              #F                                       ;09
+              #F                                       ;0A
               GC-DAEMON                                ;0B
               TRAP-HANDLER                             ;0C
-              OPEN-FILES                               ;0D
+              #F                                       ;0D
               STEPPER-STATE                            ;0E
               MICROCODE-FIXED-OBJECTS-SLOTS            ;0F
               MICROCODE-EXTERNAL-PRIMITIVES            ;10
               BINARY-FASLOAD                           ;$57
               STRING-POSITION                          ;$58
               STRING-LESS?                             ;$59
-              OBJECT-HASH                              ;$5A
-              OBJECT-UNHASH                            ;$5B
-              REHASH-GC-DAEMON                         ;$5C
+              #F                                       ;$5A
+              #F                                       ;$5B
+              REHASH                                   ;$5C
               LENGTH                                   ;$5D
               ASSQ                                     ;$5E
               LIST->STRING                             ;$5F
               SYSTEM-PAIR-CDR                          ;$87
               SYSTEM-PAIR-SET-CAR!                     ;$88
               SYSTEM-PAIR-SET-CDR!                     ;$89
-              INITIALIZE-OBJECT-HASH                   ;$8A
+              #F                                       ;$8A
               GET-CHARACTER-FROM-INPUT-CHANNEL-IMMEDIATE ;$8B
               SET-CELL-CONTENTS!                       ;$8C
               &MAKE-OBJECT                             ;$8D
               UNBOUND-VARIABLE                         ;01
               UNASSIGNED-VARIABLE                      ;02
               UNDEFINED-PROCEDURE                      ;03
-              RAN-OUT-OF-HASH-NUMBERS                  ;04
+              #F                                       ;04
               #F                                       ;05
               BAD-FRAME                                ;06
               BROKEN-CVARIABLE                         ;07
               IMPURIFY-OBJECT-TOO-LARGE                ;19
               WRITE-INTO-PURE-SPACE                    ;1A
               #F                                       ;1B
-              NO-HASH-TABLE                            ;1C
+              #F                                       ;1C
                ASSIGN-LAMBDA-NAME                      ;1D
               FAILED-ARG-1-COERCION                    ;1E
               FAILED-ARG-2-COERCION                    ;1F
 
 ;;; This identification string is saved by the system.
 
+"$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/utabmd.scm,v 9.21 1987/02/02 15:16:36 jinx Exp $"
index 8a3aea03cbf1d714807d88ef62c85446e60bca13..279340b98ad70d17ec9c6dd7c5293b7ab1a9f0dd 100644 (file)
@@ -30,7 +30,7 @@ Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
 
-/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 9.20 1987/01/21 20:30:25 jinx Exp $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 9.21 1987/02/02 15:22:44 jinx Exp $
 
 This file contains version information for the microcode. */
 \f
@@ -46,7 +46,7 @@ This file contains version information for the microcode. */
 #define VERSION                9
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     20
+#define SUBVERSION     21
 #endif
 
 #ifndef UCODE_TABLES_FILENAME