~ chicken-core (chicken-5) e4dad2ef8c68fcde9d379c49c245081b554f119f


commit e4dad2ef8c68fcde9d379c49c245081b554f119f
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Tue Oct 11 22:03:30 2016 +0200
Commit:     Evan Hanson <evhan@foldling.org>
CommitDate: Fri Oct 28 12:27:17 2016 +1300

    Remove a few obsolete fudge factors.
    
    - eof-object wasn't used anywhere via fudge-factor anymore.
    - symbolgc can no longer be disabled.
    - manyargs and apply-hook are no longer relevant.
    - Reading any other obsolete fudge factor will now cause a panic.
    
    After this change, #:manyargs is simply always defined.
    
    Signed-off-by: Evan Hanson <evhan@foldling.org>

diff --git a/csi.scm b/csi.scm
index 6ba4d489..e329136a 100644
--- a/csi.scm
+++ b/csi.scm
@@ -502,7 +502,6 @@ EOF
 		    (argv))
 	    (##sys#write-char-0 #\newline ##sys#standard-output)
 	    (when (##sys#fudge 14) (display "interrupts are enabled\n"))
-	    (when (##sys#fudge 15) (display "symbol gc is enabled\n")) 
 	    (##core#undefined) ) ) ) ) ) )
 
 
diff --git a/library.scm b/library.scm
index 7580b568..c3e1dce6 100644
--- a/library.scm
+++ b/library.scm
@@ -4395,8 +4395,6 @@ EOF
   (if full
       (let ((spec (string-append
 		   (if (feature? #:64bit) " 64bit" "")
-		   (if (##sys#fudge 15) " symbolgc" "")
-		   (if (##sys#fudge 40) " manyargs" "")
 		   (if (##sys#fudge 24) " dload" "")
 		   (if (##sys#fudge 28) " ptables" "")
 		   (if (##sys#fudge 32) " gchooks" "")
@@ -4434,7 +4432,8 @@ EOF
 (define ##sys#features
   '(#:chicken
     #:srfi-6 #:srfi-12 #:srfi-17 #:srfi-23 #:srfi-30 #:srfi-39 #:srfi-62
-    #:irregex-is-core-unit #:full-numeric-tower))
+    ;; TODO: consider removing at least irregex-is-core-unit
+    #:irregex-is-core-unit #:full-numeric-tower #:manyargs))
 
 ;; Add system features:
 
@@ -4447,7 +4446,6 @@ EOF
   (check (machine-type))
   (check (machine-byte-order)) )
 
-(when (##sys#fudge 40) (set! ##sys#features (cons #:manyargs ##sys#features)))
 (when (##sys#fudge 24) (set! ##sys#features (cons #:dload ##sys#features)))
 (when (##sys#fudge 28) (set! ##sys#features (cons #:ptables ##sys#features)))
 (when (##sys#fudge 39) (set! ##sys#features (cons #:cross-chicken ##sys#features)))
diff --git a/runtime.c b/runtime.c
index c20c6d88..cc7ba6fd 100644
--- a/runtime.c
+++ b/runtime.c
@@ -4833,7 +4833,8 @@ C_regparm C_word C_fcall C_fudge(C_word fudge_factor)
   double tgc;
 
   switch(fudge_factor) {
-  case C_fix(1): return C_SCHEME_END_OF_FILE; /* eof object */
+  case C_fix(1):                              /* eof object */
+    panic(C_text("(##sys#fudge 1) [eof object] is obsolete"));
   case C_fix(2):			      /* get time */
     panic(C_text("(##sys#fudge 2) [get time] not implemented"));
 
@@ -4886,7 +4887,7 @@ C_regparm C_word C_fcall C_fudge(C_word fudge_factor)
     return C_mk_bool(C_interrupts_enabled);
 
   case C_fix(15):		/* symbol-gc enabled? */
-    return C_SCHEME_TRUE;
+    panic(C_text("(##sys#fudge 15) [symbolgc] is obsolete"));
 
   case C_fix(16):		/* milliseconds (wall clock) */
     panic(C_text("(##sys#fudge 16) [current wall clock milliseconds] not implemented"));
@@ -4903,7 +4904,7 @@ C_regparm C_word C_fcall C_fudge(C_word fudge_factor)
     return C_fix(j);
 
   case C_fix(20):		/* unused */
-    return C_SCHEME_FALSE;
+    panic(C_text("(##sys#fudge 20) [?] is obsolete"));
 
   case C_fix(21):		/* largest fixnum */
     return C_fix(C_MOST_POSITIVE_FIXNUM);
@@ -4941,7 +4942,7 @@ C_regparm C_word C_fcall C_fudge(C_word fudge_factor)
     return C_fix(C_trace_buffer_size);
 
   case C_fix(30):		/* unused */
-    return C_SCHEME_FALSE;
+    panic(C_text("(##sys#fudge 30) [?] is obsolete"));
 
   case C_fix(31):		/* GC time since last invocation */
     tgc = timer_accumulated_gc_ms;
@@ -4962,8 +4963,7 @@ C_regparm C_word C_fcall C_fudge(C_word fudge_factor)
     return C_fix(stack_size / 2); /* An educated guess :) */
 
   case C_fix(35):		/* unused */
-    /* used to be apply-hook indicator */
-    return C_SCHEME_FALSE;
+    panic(C_text("(##sys#fudge 35) [old apply-hack] is obsolete"));
     
   case C_fix(36):		/* toggle debug mode */
     debug_mode = !debug_mode;
@@ -4973,7 +4973,7 @@ C_regparm C_word C_fcall C_fudge(C_word fudge_factor)
     return C_mk_bool(dump_heap_on_exit);
 
   case C_fix(38):		/* unused */
-    return C_SCHEME_FALSE;      /* used to be SVN revision */
+    panic(C_text("(##sys#fudge 38) [old svn rev.] is obsolete"));
 
   case C_fix(39):		/* is this a cross-chicken? */
 #if defined(C_CROSS_CHICKEN) && C_CROSS_CHICKEN
@@ -4983,7 +4983,7 @@ C_regparm C_word C_fcall C_fudge(C_word fudge_factor)
 #endif
 
   case C_fix(40):		/* many arguments supported? */
-    return C_SCHEME_TRUE;
+    panic(C_text("(##sys#fudge 40) [manyargs] is obsolete"));
 
   case C_fix(41):		/* major CHICKEN version */
     return C_fix(C_MAJOR_VERSION);
@@ -5004,7 +5004,8 @@ C_regparm C_word C_fcall C_fudge(C_word fudge_factor)
   case C_fix(45):  /* Whether we're currently profiling */
     return C_mk_bool(profiling);
 
-  default: return C_SCHEME_UNDEFINED;
+  default:
+    panic(C_text("Unknown fudge factor"));
   }
 }
 
Trap