Add new flags to the microcode:
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 8 Jun 1989 00:19:13 +0000 (00:19 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Thu, 8 Jun 1989 00:19:13 +0000 (00:19 +0000)
BAD_TYPES_INNOCUOUS
If a bad type is seen, the system treats it as a non-pointer for most
purposes.

BAD_TYPES_LETHAL
If a bad type is seen, kill Scheme with TERM_INVALID_TYPE_CODE.

The default is BAD_TYPES_LETHAL when there is no compiler support,
BAD_TYPES_INNOCUOUS when there is.

v7/src/microcode/bchdmp.c
v7/src/microcode/bchgcl.c

index c9f20d8ca4cde6ffa778ab6fdc1ebbbdaf6e6364..22b988f32ee8557e4b97181a1ded59201b735adc 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/bchdmp.c,v 9.43 1988/08/15 20:35:56 cph Exp $ */
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchdmp.c,v 9.44 1989/06/08 00:19:08 jinx Rel $ */
 
 /* bchgcl, bchmmg, bchpur, and bchdmp can replace gcloop, memmag,
    purify, and fasdump, respectively, to provide garbage collection
@@ -337,10 +337,6 @@ dumploop(Scan, To_ptr, To_Address_ptr)
       case TC_PCOMB0:
        *Scan = dump_renumber_primitive(*Scan);
        break;
-
-      case TC_STACK_ENVIRONMENT:
-      case_Fasload_Non_Pointer:
-       break;
 \f
       case_compiled_entry_point:
        fasdump_compiled_entry();
@@ -540,12 +536,13 @@ dumploop(Scan, To_ptr, To_Address_ptr)
        continue;
 
       default:
-       sprintf(gc_death_message_buffer,
-               "dumploop: bad type code (0x%02x)",
-               OBJECT_TYPE(Temp));
-       gc_death(TERM_INVALID_TYPE_CODE, gc_death_message_buffer,
-                Scan, To);
-       /*NOTREACHED*/
+       GC_BAD_TYPE("dumploop");
+       /* Fall Through */
+
+      case TC_STACK_ENVIRONMENT:
+      case_Fasload_Non_Pointer:
+       break;
+
       }
   }
 end_dumploop:
index 634f0c1482f4168fab866c54bde473bfe368b496..959451d2429a06869d79ac2792530cd64fa0de4b 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/bchgcl.c,v 9.34 1988/08/15 20:36:15 cph Exp $ */
+/* $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/bchgcl.c,v 9.35 1989/06/08 00:19:13 jinx Rel $ */
 
 /* bchgcl, bchmmg, bchpur, and bchdmp can replace gcloop, memmag,
    purify, and fasdump, respectively, to provide garbage collection
@@ -82,7 +82,9 @@ GCLoop(Scan, To_ptr, To_Address_ptr)
           and if so we need a new bufferfull. */
        Scan += Get_Integer(Temp);
        if (Scan < scan_buffer_top)
+       {
          break;
+       }
        else
        {
          unsigned long overflow;
@@ -93,9 +95,6 @@ GCLoop(Scan, To_ptr, To_Address_ptr)
                   (overflow % GC_DISK_BUFFER_SIZE)) - 1);
          break;
        }
-
-      case_Non_Pointer:
-       break;
 \f
       case_compiled_entry_point:
        relocate_compiled_entry(true);
@@ -260,12 +259,11 @@ GCLoop(Scan, To_ptr, To_Address_ptr)
        relocate_normal_pointer(copy_weak_pair(), 2);
 
       default:
-       sprintf(gc_death_message_buffer,
-               "gcloop: bad type code (0x%02x)",
-               OBJECT_TYPE(Temp));
-       gc_death(TERM_INVALID_TYPE_CODE, gc_death_message_buffer,
-                Scan, To);
-       /*NOTREACHED*/
+       GC_BAD_TYPE("gcloop");
+       /* Fall Through */
+
+      case_Non_Pointer:
+       break;
       }
   }
 end_gcloop: