Add support for GLOBAL_OPERATOR_LINKAGE_KIND.
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 5 May 1991 00:46:18 +0000 (00:46 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Sun, 5 May 1991 00:46:18 +0000 (00:46 +0000)
12 files changed:
v7/src/microcode/bchdmp.c
v7/src/microcode/bchgcl.c
v7/src/microcode/bchpur.c
v7/src/microcode/boot.c
v7/src/microcode/cmpgc.h
v7/src/microcode/fasload.c
v7/src/microcode/gcloop.c
v7/src/microcode/purify.c
v7/src/microcode/purutl.c
v7/src/microcode/uxtrap.c
v7/src/microcode/version.h
v8/src/microcode/version.h

index 5244018a8497cb291fc1d31a8325f91350822c98..cf8afe4488dce783681e46309e504e76ebe6be66 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchdmp.c,v 9.54 1990/11/29 00:18:23 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchdmp.c,v 9.55 1991/05/05 00:45:16 jinx Exp $
 
-Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1987-1991 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -377,71 +377,85 @@ DEFUN (dumploop, (Scan, To_ptr, To_Address_ptr),
 
       case TC_LINKAGE_SECTION:
       {
-       if ((READ_LINKAGE_KIND (Temp)) != OPERATOR_LINKAGE_KIND)
+       switch (READ_LINKAGE_KIND (Temp))
        {
-         /* count typeless pointers to quads follow. */
+         case REFERENCE_LINKAGE_KIND:
+         case ASSIGNMENT_LINKAGE_KIND:
+         {
+           /* count typeless pointers to quads follow. */
 
-         fast long count;
-         long max_count, max_here;
+           fast long count;
+           long max_count, max_here;
 
-         Scan++;
-         max_here = (scan_buffer_top - Scan);
-         max_count = (READ_CACHE_LINKAGE_COUNT (Temp));
-         while (max_count != 0)
-         {
-           count = ((max_count > max_here) ? max_here : max_count);
-           max_count -= count;
-           for ( ; --count >= 0; Scan += 1)
+           Scan++;
+           max_here = (scan_buffer_top - Scan);
+           max_count = (READ_CACHE_LINKAGE_COUNT (Temp));
+           while (max_count != 0)
            {
-             Temp = *Scan;
-             fasdump_typeless_pointer (copy_quadruple (), 4);
-           }
-           if (max_count != 0)
-           {
-             /* We stopped because we needed to relocate too many. */
-             Scan = (dump_and_reload_scan_buffer (0, NULL));
-             max_here = GC_DISK_BUFFER_SIZE;
+             count = ((max_count > max_here) ? max_here : max_count);
+             max_count -= count;
+             for ( ; --count >= 0; Scan += 1)
+             {
+               Temp = *Scan;
+               fasdump_typeless_pointer (copy_quadruple (), 4);
+             }
+             if (max_count != 0)
+             {
+               /* We stopped because we needed to relocate too many. */
+               Scan = (dump_and_reload_scan_buffer (0, NULL));
+               max_here = GC_DISK_BUFFER_SIZE;
+             }
            }
+           /* The + & -1 are here because of the Scan++ in the for header. */
+           Scan -= 1;
+           break;
          }
-         /* The + & -1 are here because of the Scan++ in the for header. */
-         Scan -= 1;
-         break;
-       }
 \f
-       else
-       {
-         /* Operator linkage */
+         case OPERATOR_LINKAGE_KIND:
+         case GLOBAL_OPERATOR_LINKAGE_KIND:
+         {
+           /* Operator linkage */
 
-         fast long count;
-         fast char *word_ptr, *next_ptr;
-         long overflow;
+           fast long count;
+           fast char *word_ptr, *next_ptr;
+           long overflow;
 
-         count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
-         word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
-         overflow = ((END_OPERATOR_LINKAGE_AREA (Scan, count)) -
-                     scan_buffer_top);
+           count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
+           word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
+           overflow = ((END_OPERATOR_LINKAGE_AREA (Scan, count)) -
+                       scan_buffer_top);
 
-         for (next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
-              (--count >= 0);
-              word_ptr = next_ptr,
-              next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr)))
-         {
-           if (next_ptr > ((char *) scan_buffer_top))
+           for (next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
+                (--count >= 0);
+                word_ptr = next_ptr,
+                next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr)))
            {
-             extend_scan_buffer (((char *) next_ptr), To);
-             fasdump_linked_operator ();
-             next_ptr = ((char *)
-                         (end_scan_buffer_extension ((char *) next_ptr)));
-             overflow -= GC_DISK_BUFFER_SIZE;
-           }
-           else
-           {
-             fasdump_linked_operator ();
+             if (next_ptr > ((char *) scan_buffer_top))
+             {
+               extend_scan_buffer (((char *) next_ptr), To);
+               fasdump_linked_operator ();
+               next_ptr = ((char *)
+                           (end_scan_buffer_extension ((char *) next_ptr)));
+               overflow -= GC_DISK_BUFFER_SIZE;
+             }
+             else
+             {
+               fasdump_linked_operator ();
+             }
            }
+           Scan = (scan_buffer_top + overflow);
+           break;
+         }
+
+         default:
+         {
+           gc_death (TERM_EXIT,
+                     "fasdump: Unknown compiler linkage kind.",
+                     Scan, Free);
+           /*NOTREACHED*/
          }
-         Scan = (scan_buffer_top + overflow);
-         break;
        }
+       break;
       }
 \f
       case TC_MANIFEST_CLOSURE:
index 55ad21b2edf9ada09ba8d79ce915d4b7f658022f..e8de30164b7daf0b2945002815c4272113f57ee2 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchgcl.c,v 9.40 1990/04/01 20:26:39 jinx Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchgcl.c,v 9.41 1991/05/05 00:45:23 jinx Exp $
 
-Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1987-1991 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -40,7 +40,7 @@ MIT in each case. */
 #include "bchgcc.h"
 \f
 SCHEME_OBJECT *
-GCLoop(Scan, To_ptr, To_Address_ptr)
+GCLoop (Scan, To_ptr, To_Address_ptr)
      fast SCHEME_OBJECT *Scan;
      SCHEME_OBJECT **To_ptr, **To_Address_ptr;
 {
@@ -98,71 +98,85 @@ GCLoop(Scan, To_ptr, To_Address_ptr)
 
       case TC_LINKAGE_SECTION:
       {
-       if (READ_LINKAGE_KIND(Temp) != OPERATOR_LINKAGE_KIND)
+       switch (READ_LINKAGE_KIND(Temp))
        {
-         /* count typeless pointers to quads follow. */
+         case REFERENCE_LINKAGE_KIND:
+         case ASSIGNMENT_LINKAGE_KIND:
+         {
+           /* count typeless pointers to quads follow. */
 
-         fast long count;
-         long max_count, max_here;
+           fast long count;
+           long max_count, max_here;
 
-         Scan++;
-         max_here = (scan_buffer_top - Scan);
-         max_count = READ_CACHE_LINKAGE_COUNT(Temp);
-         while (max_count != 0)
-         {
-           count = ((max_count > max_here) ? max_here : max_count);
-           max_count -= count;
-           for ( ; --count >= 0; Scan += 1)
+           Scan++;
+           max_here = (scan_buffer_top - Scan);
+           max_count = READ_CACHE_LINKAGE_COUNT(Temp);
+           while (max_count != 0)
            {
-             Temp = *Scan;
-             relocate_typeless_pointer(copy_quadruple(), 4);
-           }
-           if (max_count != 0)
-           {
-             /* We stopped because we needed to relocate too many. */
-             Scan = dump_and_reload_scan_buffer(0, NULL);
-             max_here = GC_DISK_BUFFER_SIZE;
+             count = ((max_count > max_here) ? max_here : max_count);
+             max_count -= count;
+             for ( ; --count >= 0; Scan += 1)
+             {
+               Temp = *Scan;
+               relocate_typeless_pointer(copy_quadruple(), 4);
+             }
+             if (max_count != 0)
+             {
+               /* We stopped because we needed to relocate too many. */
+               Scan = dump_and_reload_scan_buffer(0, NULL);
+               max_here = GC_DISK_BUFFER_SIZE;
+             }
            }
+           /* The + & -1 are here because of the Scan++ in the for header. */
+           Scan -= 1;
+           break;
          }
-         /* The + & -1 are here because of the Scan++ in the for header. */
-         Scan -= 1;
-         break;
-       }
 \f
-       else
-       {
-         /* Operator linkage */
+         case OPERATOR_LINKAGE_KIND:
+         case GLOBAL_OPERATOR_LINKAGE_KIND:
+         {
+           /* Operator linkage */
 
-         fast long count;
-         fast char *word_ptr, *next_ptr;
-         long overflow;
+           fast long count;
+           fast char *word_ptr, *next_ptr;
+           long overflow;
 
-         count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
-         word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
-         overflow = ((END_OPERATOR_LINKAGE_AREA (Scan, count)) -
-                     scan_buffer_top);
+           count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
+           word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
+           overflow = ((END_OPERATOR_LINKAGE_AREA (Scan, count)) -
+                       scan_buffer_top);
 
-         for (next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
-              (--count >= 0);
-              word_ptr = next_ptr,
-              next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr)))
-         {
-           if (next_ptr > ((char *) scan_buffer_top))
+           for (next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
+                (--count >= 0);
+                word_ptr = next_ptr,
+                next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr)))
            {
-             extend_scan_buffer ((char *) next_ptr, To);
-             relocate_linked_operator (true);
-             next_ptr = ((char *)
-                         (end_scan_buffer_extension ((char *) next_ptr)));
-             overflow -= GC_DISK_BUFFER_SIZE;
-           }
-           else
-           {
-             relocate_linked_operator (true);
+             if (next_ptr > ((char *) scan_buffer_top))
+             {
+               extend_scan_buffer ((char *) next_ptr, To);
+               relocate_linked_operator (true);
+               next_ptr = ((char *)
+                           (end_scan_buffer_extension ((char *) next_ptr)));
+               overflow -= GC_DISK_BUFFER_SIZE;
+             }
+             else
+             {
+               relocate_linked_operator (true);
+             }
            }
+           Scan = (scan_buffer_top + overflow);
+           break;
+         }
+
+         default:
+         {
+           gc_death (TERM_EXIT,
+                     "GC: Unknown compiler linkage kind.",
+                     Scan, Free);
+           /*NOTREACHED*/
          }
-         Scan = (scan_buffer_top + overflow);
-         break;
        }
+       break;
       }
 \f
       case TC_MANIFEST_CLOSURE:
index 564c93e1e8eac85e0e811d442d094e16291f7772..850901a4f5dc6f6b5d33140aa01bd39c5b065ff1 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchpur.c,v 9.52 1991/02/26 21:15:56 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchpur.c,v 9.53 1991/05/05 00:45:30 jinx Exp $
 
 Copyright (c) 1987-91 Massachusetts Institute of Technology
 
@@ -146,71 +146,85 @@ DEFUN (purifyloop, (Scan, To_ptr, To_Address_ptr, purify_mode),
                    Scan, To);
          /*NOTREACHED*/
        }
-       if ((READ_LINKAGE_KIND (Temp)) != OPERATOR_LINKAGE_KIND)
+       switch (READ_LINKAGE_KIND (Temp))
        {
-         /* count typeless pointers to quads follow. */
+         case REFERENCE_LINKAGE_KIND:
+         case ASSIGNMENT_LINKAGE_KIND:
+         {
+           /* count typeless pointers to quads follow. */
 
-         fast long count;
-         long max_count, max_here;
+           fast long count;
+           long max_count, max_here;
 
-         Scan++;
-         max_here = (scan_buffer_top - Scan);
-         max_count = (READ_CACHE_LINKAGE_COUNT (Temp));
-         while (max_count != 0)
-         {
-           count = ((max_count > max_here) ? max_here : max_count);
-           max_count -= count;
-           for ( ; --count >= 0; Scan += 1)
+           Scan++;
+           max_here = (scan_buffer_top - Scan);
+           max_count = (READ_CACHE_LINKAGE_COUNT (Temp));
+           while (max_count != 0)
            {
-             Temp = *Scan;
-             relocate_typeless_pointer (copy_quadruple(), 4);
-           }
-           if (max_count != 0)
-           {
-             /* We stopped because we needed to relocate too many. */
-             Scan = dump_and_reload_scan_buffer(0, NULL);
-             max_here = GC_DISK_BUFFER_SIZE;
+             count = ((max_count > max_here) ? max_here : max_count);
+             max_count -= count;
+             for ( ; --count >= 0; Scan += 1)
+             {
+               Temp = *Scan;
+               relocate_typeless_pointer (copy_quadruple(), 4);
+             }
+             if (max_count != 0)
+             {
+               /* We stopped because we needed to relocate too many. */
+               Scan = dump_and_reload_scan_buffer(0, NULL);
+               max_here = GC_DISK_BUFFER_SIZE;
+             }
            }
+           /* The + & -1 are here because of the Scan++ in the for header. */
+           Scan -= 1;
+           break;
          }
-         /* The + & -1 are here because of the Scan++ in the for header. */
-         Scan -= 1;
-         break;
-       }
 \f
-       else
-       {
-         /* Operator linkage */
+         case OPERATOR_LINKAGE_KIND:
+         case GLOBAL_OPERATOR_LINKAGE_KIND:
+         {
+           /* Operator linkage */
 
-         fast long count;
-         fast char *word_ptr, *next_ptr;
-         long overflow;
+           fast long count;
+           fast char *word_ptr, *next_ptr;
+           long overflow;
 
-         count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
-         word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
-         overflow = ((END_OPERATOR_LINKAGE_AREA (Scan, count)) -
-                     scan_buffer_top);
+           count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
+           word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
+           overflow = ((END_OPERATOR_LINKAGE_AREA (Scan, count)) -
+                       scan_buffer_top);
 
-         for (next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
-              (--count >= 0);
-              word_ptr = next_ptr,
-              next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr)))
-         {
-           if (next_ptr > ((char *) scan_buffer_top))
+           for (next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
+                (--count >= 0);
+                word_ptr = next_ptr,
+                next_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr)))
            {
-             extend_scan_buffer (((char *) next_ptr), To);
-             relocate_linked_operator (false);
-             next_ptr = ((char *)
-                         (end_scan_buffer_extension ((char *) next_ptr)));
-             overflow -= GC_DISK_BUFFER_SIZE;
-           }
-           else
-           {
-             relocate_linked_operator (false);
+             if (next_ptr > ((char *) scan_buffer_top))
+             {
+               extend_scan_buffer (((char *) next_ptr), To);
+               relocate_linked_operator (false);
+               next_ptr = ((char *)
+                           (end_scan_buffer_extension ((char *) next_ptr)));
+               overflow -= GC_DISK_BUFFER_SIZE;
+             }
+             else
+             {
+               relocate_linked_operator (false);
+             }
            }
+           Scan = (scan_buffer_top + overflow);
+           break;
+         }
+
+         default:
+         {
+           gc_death (TERM_EXIT,
+                     "purify: Unknown compiler linkage kind.",
+                     Scan, Free);
+           /*NOTREACHED*/
          }
-         Scan = (scan_buffer_top + overflow);
-         break;
        }
+       break;
       }
 \f
       case TC_MANIFEST_CLOSURE:
index fa3e018db9f44f74f005a4ed9c517be64eb9da77..b1425db3a5330cdff327d50535d60d406810e157 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.69 1991/05/02 06:12:32 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/boot.c,v 9.70 1991/05/05 00:45:37 jinx Exp $
 
 Copyright (c) 1988-1991 Massachusetts Institute of Technology
 
@@ -259,6 +259,29 @@ DEFUN_VOID (make_fixed_objects_vector)
     (fixed_objects_vector,
      GENERIC_TRAMPOLINE_DIVIDE,
      SHARP_F);
+  FAST_VECTOR_SET
+    (fixed_objects_vector,
+     GENERIC_TRAMPOLINE_QUOTIENT,
+     SHARP_F);
+  FAST_VECTOR_SET
+    (fixed_objects_vector,
+     GENERIC_TRAMPOLINE_REMAINDER,
+     SHARP_F);
+  FAST_VECTOR_SET
+    (fixed_objects_vector,
+     GENERIC_TRAMPOLINE_MODULO,
+     SHARP_F);
+
+  /* This guarantees that it will not be EQ? to anything
+     until smashed by the runtime system.
+   */
+
+  (*Free++) = EMPTY_LIST;
+  (*Free++) = EMPTY_LIST;
+  FAST_VECTOR_SET
+    (fixed_objects_vector,
+     ARITY_DISPATCHER_TAG,
+     (MAKE_POINTER_OBJECT (TC_LIST, (Free - 2))));
 
   return (fixed_objects_vector);
 }
index 9e62335c8241d6078028a154530508a4d35408f2..edec2b9869a81f4c838e29347d3ca61c1c381b49 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpgc.h,v 1.15 1991/03/22 06:27:39 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/cmpgc.h,v 1.16 1991/05/05 00:40:42 jinx Exp $
 
 Copyright (c) 1989-1991 Massachusetts Institute of Technology
 
@@ -232,6 +232,7 @@ MAKE_POINTER_OBJECT((OBJECT_TYPE(object)),                          \
 #define OPERATOR_LINKAGE_KIND                  0x000000
 #define REFERENCE_LINKAGE_KIND                 0x010000
 #define ASSIGNMENT_LINKAGE_KIND                        0x020000
+#define GLOBAL_OPERATOR_LINKAGE_KIND           0x030000
 
 #define READ_LINKAGE_KIND(header)                                      \
   ((header) & 0xff0000)
@@ -245,8 +246,9 @@ MAKE_POINTER_OBJECT((OBJECT_TYPE(object)),                          \
 #define MAKE_LINKAGE_SECTION_HEADER(kind, count)                       \
   (MAKE_OBJECT(TC_LINKAGE_SECTION,                                     \
               ((kind) |                                                \
-               (((kind) == OPERATOR_LINKAGE_KIND) ?                    \
-                (EXECUTE_CACHE_ENTRIES_TO_COUNT(count)) :              \
+               ((((kind) == OPERATOR_LINKAGE_KIND)                     \
+                 || ((kind) == GLOBAL_OPERATOR_LINKAGE_KIND)) ?        \
+                (EXECUTE_CACHE_ENTRIES_TO_COUNT (count)) :             \
                 (count)))))
 
 /* This takes into account the 1 added by the main loop of the
index 1b5d25cf83eb8debb505a3a5267a1b9421f8cd4f..9884b689939af56d552f4f8574fbbf080175e918 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/fasload.c,v 9.61 1991/03/21 23:26:27 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/fasload.c,v 9.62 1991/05/05 00:45:46 jinx Exp $
 
 Copyright (c) 1987-1991 Massachusetts Institute of Technology
 
@@ -459,46 +459,61 @@ DEFUN (Relocate_Block, (Scan, Stop_At),
           This also applies to TC_MANIFEST_CLOSURE.
           The lines affected are the ones where ADDRESS_TO_DATUM is used.
         */
-       if (READ_LINKAGE_KIND(Temp) != OPERATOR_LINKAGE_KIND)
+       switch (READ_LINKAGE_KIND(Temp))
        {
-         /* Assumes that all others are objects of type TC_QUAD without
-            their type codes.
-          */
-
-         fast long count;
-
-         Scan++;
-         for (count = (READ_CACHE_LINKAGE_COUNT (Temp));
-              --count >= 0;
-              )
+         case REFERENCE_LINKAGE_KIND:
+         case ASSIGNMENT_LINKAGE_KIND:
          {
-           address = (ADDRESS_TO_DATUM ((SCHEME_OBJECT *) (*Scan)));
-           *Scan++ = ((SCHEME_OBJECT) (Relocate (address)));
+           /* Assumes that all others are objects of type TC_QUAD without
+              their type codes.
+              */
+
+           fast long count;
+
+           Scan++;
+           for (count = (READ_CACHE_LINKAGE_COUNT (Temp));
+                --count >= 0;
+                )
+           {
+             address = (ADDRESS_TO_DATUM ((SCHEME_OBJECT *) (*Scan)));
+             *Scan++ = ((SCHEME_OBJECT) (Relocate (address)));
+           }
+           break;
          }
-         break;
-       }
-       else
-       {
-         fast long count;
-         fast char *word_ptr;
-         SCHEME_OBJECT *end_scan;
 
-         count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
-         word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
-         end_scan = (END_OPERATOR_LINKAGE_AREA (Scan, count));
+         case OPERATOR_LINKAGE_KIND:
+         case GLOBAL_OPERATOR_LINKAGE_KIND:
+         {
+           fast long count;
+           fast char *word_ptr;
+           SCHEME_OBJECT *end_scan;
+
+           count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
+           word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
+           end_scan = (END_OPERATOR_LINKAGE_AREA (Scan, count));
+
+           while(--count >= 0)
+           {
+             Scan = ((SCHEME_OBJECT *) (word_ptr));
+             word_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
+             EXTRACT_OPERATOR_LINKAGE_ADDRESS (address, Scan);
+             address = (ADDRESS_TO_DATUM ((SCHEME_OBJECT *) address));
+             address = ((long) (Relocate (address)));
+             STORE_OPERATOR_LINKAGE_ADDRESS (address, Scan);
+           }
+           Scan = &end_scan[1];
+           break;
+         }
 
-         while(--count >= 0)
+         default:
          {
-           Scan = ((SCHEME_OBJECT *) (word_ptr));
-           word_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
-           EXTRACT_OPERATOR_LINKAGE_ADDRESS (address, Scan);
-           address = (ADDRESS_TO_DATUM ((SCHEME_OBJECT *) address));
-           address = ((long) (Relocate (address)));
-           STORE_OPERATOR_LINKAGE_ADDRESS (address, Scan);
+           gc_death (TERM_EXIT,
+                     "Relocate_Block: Unknown compiler linkage kind.",
+                     Scan, NULL);
+           /*NOTREACHED*/
          }
-         Scan = &end_scan[1];
-         break;
        }
+       break;
       }
 \f
       case TC_MANIFEST_CLOSURE:
index 43222dda0e392a3e505870dc87c55bbc858b02e8..0932b7341fd48c7fbbc510ae888cc691ad01dcad 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-Copyright (c) 1987, 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1987-1991 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -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/gcloop.c,v 9.34 1990/01/20 07:29:47 cph Rel $
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/gcloop.c,v 9.35 1991/05/05 00:45:55 jinx Exp $
  *
  * This file contains the code for the most primitive part
  * of garbage collection.
@@ -152,49 +152,65 @@ GCLoop(Scan, To_Pointer)
 
       case TC_LINKAGE_SECTION:
       {
-       if (READ_LINKAGE_KIND(Temp) != OPERATOR_LINKAGE_KIND)
+       switch (READ_LINKAGE_KIND (Temp))
        {
-         /* Assumes that all others are objects of type TC_QUAD without
-            their type codes.
-          */
-
-         fast long count;
-
-         Scan++;
-         for (count = READ_CACHE_LINKAGE_COUNT(Temp);
-              --count >= 0;
-              Scan += 1)
+         case REFERENCE_LINKAGE_KIND:
+         case ASSIGNMENT_LINKAGE_KIND:
          {
-           Temp = *Scan;
-           Setup_Pointer_for_GC(Transport_Quadruple());
+           /* Assumes that all others are objects of type TC_QUAD without
+              their type codes.
+              */
+
+           fast long count;
+
+           Scan++;
+           for (count = READ_CACHE_LINKAGE_COUNT(Temp);
+                --count >= 0;
+                Scan += 1)
+           {
+             Temp = *Scan;
+             Setup_Pointer_for_GC(Transport_Quadruple());
+           }
+           Scan -= 1;
+           break;
          }
-         Scan -= 1;
-         break;
-       }
-       else
-       {
-         fast long count;
-         fast char *word_ptr;
-         SCHEME_OBJECT *end_scan;
 
-         count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
-         word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
-         end_scan = (END_OPERATOR_LINKAGE_AREA (Scan, count));
+         case OPERATOR_LINKAGE_KIND:
+         case GLOBAL_OPERATOR_LINKAGE_KIND:
+         {
+           fast long count;
+           fast char *word_ptr;
+           SCHEME_OBJECT *end_scan;
+
+           count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
+           word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
+           end_scan = (END_OPERATOR_LINKAGE_AREA (Scan, count));
+
+           while(--count >= 0)
+           {
+             Scan = ((SCHEME_OBJECT *) word_ptr);
+             word_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
+             EXTRACT_OPERATOR_LINKAGE_ADDRESS (Temp, Scan);
+             GC_Pointer(Setup_Internal(true,
+                                       Transport_Compiled(),
+                                       Compiled_BH(true,
+                                                   goto next_operator)));
+             next_operator:
+             STORE_OPERATOR_LINKAGE_ADDRESS (Temp, Scan);
+           }
+           Scan = end_scan;
+           break;
+         }
 
-         while(--count >= 0)
+         default:
          {
-           Scan = ((SCHEME_OBJECT *) word_ptr);
-           word_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
-           EXTRACT_OPERATOR_LINKAGE_ADDRESS (Temp, Scan);
-           GC_Pointer(Setup_Internal(true,
-                                     Transport_Compiled(),
-                                     Compiled_BH(true, goto next_operator)));
-         next_operator:
-           STORE_OPERATOR_LINKAGE_ADDRESS (Temp, Scan);
+           gc_death (TERM_EXIT,
+                     "GC: Unknown compiler linkage kind.",
+                     Scan, Free);
+           /*NOTREACHED*/
          }
-         Scan = end_scan;
-         break;
        }
+       break;
       }
 \f
       case TC_MANIFEST_CLOSURE:
index c2422d6a5c106ddc6d9e1d31c1d619992b12c184..aa597f4afa870ceab65fa08bec9e036f59775764 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/purify.c,v 9.45 1991/02/24 01:10:56 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/purify.c,v 9.46 1991/05/05 00:46:02 jinx Exp $
 
 Copyright (c) 1988-1991 Massachusetts Institute of Technology
 
@@ -126,50 +126,66 @@ DEFUN (PurifyLoop,
                   Scan, To);
          /*NOTREACHED*/
        }
-       if (READ_LINKAGE_KIND(Temp) != OPERATOR_LINKAGE_KIND)
-       {
-         /* Assumes that all others are objects of type TC_QUAD without
-            their type codes.
-          */
-
-         fast long count;
 
-         Scan++;
-         for (count = READ_CACHE_LINKAGE_COUNT(Temp);
-              --count >= 0;
-              Scan += 1)
+       switch (READ_LINKAGE_KIND (Temp))
+       {
+         case REFERENCE_LINKAGE_KIND:
+         case ASSIGNMENT_LINKAGE_KIND:
          {
-           Temp = *Scan;
-           Setup_Pointer_for_Purify(Transport_Quadruple());
+           /* Assumes that all others are objects of type TC_QUAD without
+              their type codes.
+            */
+
+           fast long count;
+
+           Scan++;
+           for (count = READ_CACHE_LINKAGE_COUNT(Temp);
+                --count >= 0;
+                Scan += 1)
+           {
+             Temp = *Scan;
+             Setup_Pointer_for_Purify(Transport_Quadruple());
+           }
+           Scan -= 1;
+           break;
          }
-         Scan -= 1;
-         break;
-       }
-       else
-       {
-         fast long count;
-         fast char *word_ptr;
-         SCHEME_OBJECT *end_scan;
 
-         count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
-         word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
-         end_scan = (END_OPERATOR_LINKAGE_AREA (Scan, count));
+         case OPERATOR_LINKAGE_KIND:
+         case GLOBAL_OPERATOR_LINKAGE_KIND:
+         {
+           fast long count;
+           fast char *word_ptr;
+           SCHEME_OBJECT *end_scan;
+
+           count = (READ_OPERATOR_LINKAGE_COUNT (Temp));
+           word_ptr = (FIRST_OPERATOR_LINKAGE_ENTRY (Scan));
+           end_scan = (END_OPERATOR_LINKAGE_AREA (Scan, count));
+
+           while(--count >= 0)
+           {
+             Scan = ((SCHEME_OBJECT *) word_ptr);
+             word_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
+             EXTRACT_OPERATOR_LINKAGE_ADDRESS (Temp, Scan);
+             Purify_Pointer(Setup_Internal(false,
+                                           Transport_Compiled(),
+                                           Compiled_BH(false,
+                                                       goto next_operator)));
+             next_operator:
+             STORE_OPERATOR_LINKAGE_ADDRESS(Temp, Scan);
+           }
+           Scan = end_scan;
+           break;
+         }
 
-         while(--count >= 0)
+         default:
          {
-           Scan = ((SCHEME_OBJECT *) word_ptr);
-           word_ptr = (NEXT_LINKAGE_OPERATOR_ENTRY (word_ptr));
-           EXTRACT_OPERATOR_LINKAGE_ADDRESS (Temp, Scan);
-           Purify_Pointer(Setup_Internal(false,
-                                         Transport_Compiled(),
-                                         Compiled_BH(false,
-                                                     goto next_operator)));
-         next_operator:
-           STORE_OPERATOR_LINKAGE_ADDRESS(Temp, Scan);
+           gc_death (TERM_EXIT,
+                     "purifyloop: Unknown compiler linkage kind.",
+                     Scan, Free);
+           /*NOTREACHED*/
          }
-         Scan = end_scan;
-         break;
        }
+       break;
       }
 \f
       case TC_MANIFEST_CLOSURE:
index 442e34fdfe878702b0a5a20dd8c33cb4730f17c0..c564115783abeeb1b10d50a173ba97006a7ec06b 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/purutl.c,v 9.40 1991/02/24 01:11:04 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/purutl.c,v 9.41 1991/05/05 00:46:07 jinx Exp $
 
 Copyright (c) 1987-1991 Massachusetts Institute of Technology
 
@@ -51,12 +51,12 @@ DEFUN (Update,
 
   for (; From < To; From++)
   {
-    if (GC_Type_Special(*From))
+    if (GC_Type_Special (*From))
     {
-      switch(OBJECT_TYPE (*From))
+      switch (OBJECT_TYPE (*From))
       {
        case TC_MANIFEST_NM_VECTOR:
-         From += OBJECT_DATUM (*From);
+         From += (OBJECT_DATUM (*From));
          continue;
 
          /* The following two type codes assume that none of the protected
@@ -64,17 +64,32 @@ DEFUN (Update,
             This may be seriously wrong!
           */
        case TC_LINKAGE_SECTION:
-         if (READ_LINKAGE_KIND(*From) != OPERATOR_LINKAGE_KIND)
+         switch (READ_LINKAGE_KIND (*From))
          {
-           From += READ_CACHE_LINKAGE_COUNT(*From);
-           continue;
-         }
-         else
-         {
-           count = READ_OPERATOR_LINKAGE_COUNT(*From);
-           From = END_OPERATOR_LINKAGE_AREA(From, count);
-           continue;
+           case REFERENCE_LINKAGE_KIND:
+           case ASSIGNMENT_LINKAGE_KIND:
+           {
+             From += (READ_CACHE_LINKAGE_COUNT (*From));
+             continue;
+           }
+
+           case OPERATOR_LINKAGE_KIND:
+           case GLOBAL_OPERATOR_LINKAGE_KIND:
+           {
+             count = (READ_OPERATOR_LINKAGE_COUNT (*From));
+             From = (END_OPERATOR_LINKAGE_AREA (From, count));
+             continue;
+           }
+
+           default:
+           {
+             gc_death (TERM_EXIT,
+                       "Impurify: Unknown compiler linkage kind.",
+                       From, NULL);
+             /*NOTREACHED*/
+           }
          }
+
 \f
        case TC_MANIFEST_CLOSURE:
        {
index 14e566eba8c17790062e9b8413dda42e65d3d6f2..e62cd963fd6cd34e496e12284b5e6f18e5147849 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxtrap.c,v 1.8 1991/02/24 01:11:22 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxtrap.c,v 1.9 1991/05/05 00:46:12 jinx Exp $
 
 Copyright (c) 1990-1991 Massachusetts Institute of Technology
 
@@ -674,13 +674,29 @@ DEFUN (find_block_address_in_area, (pc_value, area_start),
        {
        case TC_LINKAGE_SECTION:
          {
-           if ((READ_LINKAGE_KIND (object)) != OPERATOR_LINKAGE_KIND)
-             area += ((READ_CACHE_LINKAGE_COUNT (object)) + 1);
-           else
+           switch (READ_LINKAGE_KIND (object))
+           {
+             case REFERENCE_LINKAGE_KIND:
+             case ASSIGNMENT_LINKAGE_KIND:
+               area += ((READ_CACHE_LINKAGE_COUNT (object)) + 1);
+               break;
+
+             case OPERATOR_LINKAGE_KIND:
+             case GLOBAL_OPERATOR_LINKAGE_KIND:
              {
                long count = (READ_OPERATOR_LINKAGE_COUNT (object));
                area = ((END_OPERATOR_LINKAGE_AREA (area, count)) + 1);
+               break;
              }
+
+             default:
+             {
+               gc_death (TERM_EXIT,
+                         "find_block_address: Unknown compiler linkage kind.",
+                         area, NULL);
+               /*NOTREACHED*/
+             }
+           }
            break;
          }
        case TC_MANIFEST_CLOSURE:
index 965bb8279bbee4091f9593f14d72f6eb6e73e81b..bebb1689f705d7c201099dcd65a052f8e0a1b40b 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.76 1991/04/27 00:43:50 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.77 1991/05/05 00:46:18 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     76
+#define SUBVERSION     77
 #endif
index 27ef9ea4d8efe7ccd4ae02a5070797e10ae619ee..f3e9d00408a13a00059713d6cc384dbbf840207f 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.76 1991/04/27 00:43:50 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.77 1991/05/05 00:46:18 jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     76
+#define SUBVERSION     77
 #endif