Add compiler:noisy?
authorGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 26 Mar 1990 23:45:38 +0000 (23:45 +0000)
committerGuillermo J. Rozas <edu/mit/csail/zurich/gjr>
Mon, 26 Mar 1990 23:45:38 +0000 (23:45 +0000)
v7/src/compiler/base/switch.scm
v7/src/compiler/base/toplev.scm

index 0bab6e221d4f6bcf2d79869bb0136003960f2f34..e554dd6f3bc77d9353cc321ce12963d75a4c2ad8 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/switch.scm,v 4.13 1990/01/18 22:42:54 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/switch.scm,v 4.14 1990/03/26 23:45:19 jinx Exp $
 
 Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
 
@@ -41,6 +41,7 @@ MIT in each case. |#
 (define compiler:enable-integration-declarations? true)
 (define compiler:enable-expansion-declarations? false)
 (define compiler:compile-by-procedures? true)
+(define compiler:noisy? true)
 (define compiler:show-time-reports? false)
 (define compiler:show-procedures? true)
 (define compiler:show-phases? false)
index e3ccbd5c702ae9b8f84840b4f4261b6deadecd67..ef5f2abe366bdf11575e979370f1af3e1071927a 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/toplev.scm,v 4.25 1990/01/18 22:42:58 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/toplev.scm,v 4.26 1990/03/26 23:45:38 jinx Exp $
 
 Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
 
@@ -91,11 +91,13 @@ MIT in each case. |#
                           (merge-pathnames (->pathname output-string)
                                            output-pathname)
                           output-pathname))))
-               (newline)
-               (write-string "Compile File: ")
-               (write (pathname->string input-pathname))
-               (write-string " => ")
-               (write (pathname->string output-pathname))
+               (if compiler:noisy?
+                   (begin
+                     (newline)
+                     (write-string "Compile File: ")
+                     (write (pathname->string input-pathname))
+                     (write-string " => ")
+                     (write (pathname->string output-pathname))))
                (fasdump (transform input-pathname output-pathname)
                         output-pathname)))))
         (kernel
@@ -127,7 +129,8 @@ MIT in each case. |#
 ;;;; Alternate Entry Points
 
 (define (compile-procedure procedure)
-  (scode-eval (compile-scode (procedure-lambda procedure))
+  (scode-eval (fluid-let ((compiler:noisy? false))
+               (compile-scode (procedure-lambda procedure)))
              (procedure-environment procedure)))
 
 (define (compiler:batch-compile input #!optional output)
@@ -366,9 +369,10 @@ MIT in each case. |#
                                           (list->vector others))
                                     all-blocks)))
                              expression)))))))
-            (compiler-time-report "Total compilation time"
-                                  *process-time*
-                                  *real-time*)
+            (if compiler:show-time-reports?
+                (compiler-time-report "Total compilation time"
+                                      *process-time*
+                                      *real-time*))
             value))))
     (if compiler:preserve-data-structures?
        (begin
@@ -501,7 +505,15 @@ MIT in each case. |#
                     (pathname->string info-output-pathname)
                     *info-output-filename*))
                (*rtl-output-port* rtl-output-port)
-               (*lap-output-port* lap-output-port))
+               (*lap-output-port* lap-output-port)
+               (compiler:show-phases?
+                (and compiler:noisy? compiler:show-phases?))
+               (compiler:show-subphases?
+                (and compiler:noisy? compiler:show-subphases?))
+               (compiler:show-time-reports?
+                (and compiler:noisy? compiler:show-time-reports?))
+               (compiler:show-procedures?
+                (and compiler:noisy? compiler:show-procedures?)))
       (wrapper
        (lambda ()
         (set! *input-scode* scode)