~ chicken-core (chicken-5) bd3a68b105f20f0643d2f5d10c53409a82ae0ef2


commit bd3a68b105f20f0643d2f5d10c53409a82ae0ef2
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Fri Dec 30 12:39:56 2011 +0100
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Fri Jan 20 08:51:29 2012 +0100

    -debug e shows specializations, sorted output of -debug h

diff --git a/scrutinizer.scm b/scrutinizer.scm
index a0ac015a..e3a91715 100755
--- a/scrutinizer.scm
+++ b/scrutinizer.scm
@@ -799,7 +799,7 @@
     (let ((rn (walk (first (node-subexpressions node)) '() '() #f #f (list (tag)) #f)))
       (when (pair? specialization-statistics)
 	(with-debugging-output
-	 'o
+	 '(o e)
 	 (lambda ()
 	   (print "specializations:")
 	   (for-each 
@@ -807,9 +807,9 @@
 	      (printf "  ~a ~s~%" (cdr ss) (car ss)))
 	    specialization-statistics))))
       (when (positive? safe-calls)
-	(debugging 'o "safe calls" safe-calls))
+	(debugging '(o e) "safe calls" safe-calls))
       (when (positive? dropped-branches)
-	(debugging 'o "dropped branches" dropped-branches))
+	(debugging '(o e) "dropped branches" dropped-branches))
       (when errors
 	(quit "some variable types do not satisfy strictness"))
       rn)))
diff --git a/support.scm b/support.scm
index c02dc893..38fa20c7 100644
--- a/support.scm
+++ b/support.scm
@@ -84,15 +84,20 @@
     (for-each
      (lambda (ln)
        (fprintf collected-debugging-output "~a|~a~%"
-	 mode ln))
+	 (if (pair? mode) (car mode) mode)
+	 ln))
      (string-split text "\n")))
-  (cond ((memq mode debugging-chicken)
+  (define (test-mode mode set)
+    (if (symbol? mode)
+	(memq mode set)
+	(pair? (lset-intersection eq? mode set))))
+  (cond ((test-mode mode debugging-chicken)
 	 (let ((txt (with-output-to-string thunk)))
 	   (display txt)
 	   (flush-output)
-	   (when (memq mode +logged-debugging-modes+)
+	   (when (test-mode mode +logged-debugging-modes+)
 	     (collect txt))))
-	((memq mode +logged-debugging-modes+)
+	((test-mode mode +logged-debugging-modes+)
 	 (collect (with-output-to-string thunk)))))
 
 (define (quit msg . args)
@@ -1719,27 +1724,29 @@ EOF
 
 Available debugging options:
 
-     t          show time needed for compilation
+     a          show node-matching during simplification
      b          show breakdown of time needed for each compiler pass
-     o          show performed optimizations
+     c          print every expression before macro-expansion
+     d          lists all assigned global variables
+     e          show information about specializations
+     h          you already figured that out
      i          show information about inlining
-     r          show invocation parameters
-     s          show program-size information and other statistics
-     a          show node-matching during simplification
-     p          display information about what the compiler is currently doing
      m          show GC statistics during compilation
      n          print the line-number database 
-     c          print every expression before macro-expansion
+     o          show performed optimizations
+     p          display information about what the compiler is currently doing
+     r          show invocation parameters
+     s          show program-size information and other statistics
+     t          show time needed for compilation
      u          lists all unassigned global variable references
-     d          lists all assigned global variables
-     I          show inferred type information for unexported globals
      x          display information about experimental features
      D          when printing nodes, use node-tree output
+     I          show inferred type information for unexported globals
+     M          show syntax-/runtime-requirements
      N          show the real-name mapping table
+     P          show expressions after specialization
      S          show applications of compiler syntax
      T          show expressions after converting to node tree
-     P          show expressions after specialization
-     M          show syntax-/runtime-requirements
      1          show source expressions
      2          show canonicalized expressions
      3          show expressions converted into CPS
@@ -1749,7 +1756,6 @@ Available debugging options:
      7          show expressions after complete optimization
      8          show database after final analysis
      9          show expressions after closure conversion
-     h          you already figured that out
 
 
 EOF
Trap