Fix parameterization in unpars.scm.
authorChris Hanson <org/chris-hanson/cph>
Sun, 28 Feb 2016 08:00:23 +0000 (00:00 -0800)
committerChris Hanson <org/chris-hanson/cph>
Sun, 28 Feb 2016 08:00:23 +0000 (00:00 -0800)
41 files changed:
src/6001/nodefs.scm
src/compiler/base/debug.scm
src/compiler/base/object.scm
src/compiler/base/toplev.scm
src/compiler/documentation/porting.guide
src/compiler/machines/C/compiler.pkg
src/compiler/machines/alpha/compiler.pkg
src/compiler/machines/alpha/dassm1.scm
src/compiler/machines/bobcat/compiler.pkg
src/compiler/machines/bobcat/dassm1.scm
src/compiler/machines/i386/compiler.pkg
src/compiler/machines/i386/dassm1.scm
src/compiler/machines/mips/compiler.pkg
src/compiler/machines/mips/dassm1.scm
src/compiler/machines/spectrum/compiler.pkg
src/compiler/machines/spectrum/dassm1.scm
src/compiler/machines/svm/compiler.pkg
src/compiler/machines/svm/disassembler.scm
src/compiler/machines/vax/compiler.pkg
src/compiler/machines/vax/dassm1.scm
src/compiler/machines/x86-64/compiler.pkg
src/compiler/machines/x86-64/dassm1.scm
src/edwin/artdebug.scm
src/edwin/debug.scm
src/edwin/evlcom.scm
src/edwin/intmod.scm
src/edwin/prompt.scm
src/edwin/schmod.scm
src/runtime/boot.scm
src/runtime/debug.scm
src/runtime/error.scm
src/runtime/pp.scm
src/runtime/rep.scm
src/runtime/runtime.pkg
src/runtime/stack-sample.scm
src/runtime/swank.scm
src/runtime/unpars.scm
src/sf/cgen.scm
src/sicp/compat.scm
src/swat/scheme/other/rtest.scm
tests/unit-testing.scm

index f45f75d81f7f391daab530efb74e1a03ccd14760..31a4364a5f0170393f1847f69deaf69d7f90366d 100644 (file)
@@ -77,8 +77,8 @@ USA.
      (if (not (default-object? value))
         (begin
           (write-string " --> " port)
-          (parameterize* (list (cons *unparser-list-depth-limit* 2)
-                               (cons *unparser-list-breadth-limit* 10)
-                               (cons *unparser-string-length-limit* 30))
+          (parameterize* (list (cons param:unparser-list-depth-limit 2)
+                               (cons param:unparser-list-breadth-limit 10)
+                               (cons param:unparser-string-length-limit 30))
             (lambda ()
               (write value port))))))))
index d0632ca552a43f038a59d2b301e8eb57a605ecd2..dbe10b2e12a7cd46e9a3c326fcba41735526694d 100644 (file)
@@ -105,15 +105,15 @@ USA.
 
 (define (write-instructions thunk)
   (fluid-let ((*show-instruction* write))
-    (parameterize* (list (cons *unparser-radix* 16)
-                        (cons *unparse-uninterned-symbols-by-name?* #t))
+    (parameterize* (list (cons param:unparser-radix 16)
+                        (cons param:unparse-uninterned-symbols-by-name? #t))
       thunk)))
 
 (define (pp-instructions thunk)
   (fluid-let ((*show-instruction* pretty-print))
     (parameterize* (list (cons *pp-primitives-by-name* #f)
-                        (cons *unparser-radix* 16)
-                        (cons *unparse-uninterned-symbols-by-name?* #t))
+                        (cons param:unparser-radix 16)
+                        (cons param:unparse-uninterned-symbols-by-name? #t))
       thunk)))
 
 (define *show-instruction*)
index 842afc5c22659340207c0e801f8b83e12957eaad..dbb581758aefb15fa3c70d658c8fa7f2360188ac 100644 (file)
@@ -156,6 +156,6 @@ USA.
        (unparser/standard-method name))))
 
 (define (tagged-vector/unparse state vector)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       ((tagged-vector/unparser vector) state vector))))
index 7dd7a50b3a0a510e6dc6c9f4d1777812b2dc6732..f059f1ed23578f4d4597c8217a2cab8662fc38ec 100644 (file)
@@ -1063,8 +1063,8 @@ USA.
 (define (phase/lap-file-output scode port)
   (compiler-phase "LAP File Output"
     (lambda ()
-      (parameterize* (list (cons *unparser-radix* 16)
-                          (cons *unparse-uninterned-symbols-by-name?* #t))
+      (parameterize* (list (cons param:unparser-radix 16)
+                          (cons param:unparse-uninterned-symbols-by-name? #t))
         (lambda ()
          (with-output-to-port port
            (lambda ()
index 49192a9999ebfa31812c32fff1111363dc980ce9..985d4b2bce4e2f926fe54d1988475a4b7f5662b8 100644 (file)
@@ -3735,9 +3735,7 @@ Here is an example package declaration, drawn from the compiler:
            *rtl-procedures*
            *rtl-graphs*)
     (import (runtime compiler-info)
-           make-dbg-info-vector)
-    (import (runtime unparser)
-           *unparse-uninterned-symbols-by-name?*))
+           make-dbg-info-vector))
 
 The read-eval-print loop of Scheme evaluates all expressions in the
 same environment.  It is possible to change this environment using the
index 5024d116f2448a52048073ebad26b1a3114cbf45..92c3906cbb7f3aed2fef9765d0910b742b0c3217 100644 (file)
@@ -284,7 +284,7 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*)
+         param:unparse-uninterned-symbols-by-name?)
   (import (runtime load)
          fasload-object-file)
   (import (scode-optimizer build-utilities)
@@ -308,7 +308,7 @@ USA.
   (import (runtime pretty-printer)
          *pp-primitives-by-name*)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         param:unparse-uninterned-symbols-by-name?))
 
 (define-package (compiler pattern-matcher/lookup)
   (files "base/pmlook")
index 4d696bf08c40686dc0b891132e58827fcaf68a05..50314a077e9ba694ee040eb8133ba98645ece394 100644 (file)
@@ -243,7 +243,7 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*)
+         param:unparse-uninterned-symbols-by-name?)
   (import (scode-optimizer build-utilities)
          directory-processor))
 \f
@@ -265,7 +265,7 @@ USA.
   (import (runtime pretty-printer)
          *pp-primitives-by-name*)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         param:unparse-uninterned-symbols-by-name?))
 
 (define-package (compiler pattern-matcher/lookup)
   (files "base/pmlook")
index aa6de8e3bb63ff2832573cd6c4355982f7d83389..5215e250a99a467a569a02967faa6b788837bcfd 100644 (file)
@@ -131,7 +131,7 @@ USA.
   (disassembler/instructions false start-address end-address false))
 
 (define (disassembler/write-instruction-stream symbol-table instruction-stream)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (disassembler/for-each-instruction instruction-stream
        (lambda (offset instruction)
@@ -148,7 +148,7 @@ USA.
            (loop (instruction-stream)))))))
 \f
 (define (disassembler/write-constants-block block symbol-table)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (let ((end (system-vector-length block)))
        (let loop ((index (compiled-code-block/constants-start block)))
index 54fdb9e05092dd03413ff675929aa4fb9684c029..5effd1c62960ff1627c2295145d8dcb80ea43fb0 100644 (file)
@@ -249,7 +249,7 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*)
+         param:unparse-uninterned-symbols-by-name?)
   (import (scode-optimizer build-utilities)
          directory-processor))
 \f
@@ -271,7 +271,7 @@ USA.
   (import (runtime pretty-printer)
          *pp-primitives-by-name*)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         param:unparse-uninterned-symbols-by-name?))
 
 (define-package (compiler pattern-matcher/lookup)
   (files "base/pmlook")
index 6a37eb76301b1c64c6d308410ab3ab70b342cbfe..5de904488b2912745602f2f7a26da738b051a7cd 100644 (file)
@@ -117,7 +117,7 @@ USA.
   (disassembler/instructions false start-address end-address false))
 
 (define (disassembler/write-instruction-stream symbol-table instruction-stream)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (disassembler/for-each-instruction instruction-stream
        (lambda (offset instruction)
@@ -134,7 +134,7 @@ USA.
            (loop (instruction-stream)))))))
 \f
 (define (disassembler/write-constants-block block symbol-table)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (let ((end (system-vector-length block)))
        (let loop ((index (compiled-code-block/constants-start block)))
index 53d773c15c90b179ede9425c61a572c6eec651ac..503ba51a6c1e9a5534415f86e669b7b53c2bf256 100644 (file)
@@ -272,7 +272,7 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*)
+         param:unparse-uninterned-symbols-by-name?)
   (import (scode-optimizer build-utilities)
          directory-processor))
 \f
@@ -294,7 +294,7 @@ USA.
   (import (runtime pretty-printer)
          *pp-primitives-by-name*)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         param:unparse-uninterned-symbols-by-name?))
 
 (define-package (compiler pattern-matcher/lookup)
   (files "base/pmlook")
index 880ac54589de702ebb80a3bc5ffaa83c6b49d4df..98a41d07f30d9a92fda87cf27c8cae9cc44718a6 100644 (file)
@@ -117,7 +117,7 @@ USA.
   (disassembler/instructions #f start-address end-address #f))
 
 (define (disassembler/write-instruction-stream symbol-table instruction-stream)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (disassembler/for-each-instruction instruction-stream
        (lambda (offset instruction comment)
@@ -144,7 +144,7 @@ USA.
            (loop (instruction-stream)))))))
 \f
 (define (disassembler/write-constants-block block symbol-table)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (let ((end (system-vector-length block)))
        (let loop ((index (compiled-code-block/marked-start block)))
index 84ca71185bee17059c9052d0d79f7bcb9ebf34ee..ee0e0c62c703ee6957d16bda7a64f0d38395b43a 100644 (file)
@@ -249,7 +249,7 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*)
+         param:unparse-uninterned-symbols-by-name?)
   (import (scode-optimizer build-utilities)
          directory-processor))
 \f
@@ -271,7 +271,7 @@ USA.
   (import (runtime pretty-printer)
          *pp-primitives-by-name*)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         param:unparse-uninterned-symbols-by-name?))
 
 (define-package (compiler pattern-matcher/lookup)
   (files "base/pmlook")
index 6a37eb76301b1c64c6d308410ab3ab70b342cbfe..5de904488b2912745602f2f7a26da738b051a7cd 100644 (file)
@@ -117,7 +117,7 @@ USA.
   (disassembler/instructions false start-address end-address false))
 
 (define (disassembler/write-instruction-stream symbol-table instruction-stream)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (disassembler/for-each-instruction instruction-stream
        (lambda (offset instruction)
@@ -134,7 +134,7 @@ USA.
            (loop (instruction-stream)))))))
 \f
 (define (disassembler/write-constants-block block symbol-table)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (let ((end (system-vector-length block)))
        (let loop ((index (compiled-code-block/constants-start block)))
index 760906264af6b001829a2255002275446a466bbb..7cc516c9665ad57aad2899fd6c1eaf160927b242 100644 (file)
@@ -253,7 +253,7 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*)
+         param:unparse-uninterned-symbols-by-name?)
   (import (scode-optimizer build-utilities)
          directory-processor))
 \f
@@ -275,7 +275,7 @@ USA.
   (import (runtime pretty-printer)
          *pp-primitives-by-name*)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         param:unparse-uninterned-symbols-by-name?))
 
 (define-package (compiler pattern-matcher/lookup)
   (files "base/pmlook")
index 0adcc7b14381b5fa7af89627662ee9ab4ce0bfae..890c5f5a674a4aae1aaaf41980c64f062a621b14 100644 (file)
@@ -117,7 +117,7 @@ USA.
   (disassembler/instructions false start-address end-address false))
 
 (define (disassembler/write-instruction-stream symbol-table instruction-stream)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (disassembler/for-each-instruction instruction-stream
        (lambda (offset instruction)
@@ -134,7 +134,7 @@ USA.
            (loop (instruction-stream)))))))
 \f
 (define (disassembler/write-constants-block block symbol-table)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (let ((end (system-vector-length block)))
        (let loop ((index (compiled-code-block/constants-start block)))
index cb287357147484e27c5c421a3162897cd20a795a..e04381a8557b39784cd6981a56e500ba4e751bbb 100644 (file)
@@ -280,7 +280,7 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*)
+         param:unparse-uninterned-symbols-by-name?)
   (import (scode-optimizer build-utilities)
          directory-processor))
 \f
@@ -302,7 +302,7 @@ USA.
   (import (runtime pretty-printer)
          *pp-primitives-by-name*)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         param:unparse-uninterned-symbols-by-name?))
 
 (define-package (compiler pattern-matcher/lookup)
   (files "base/pmlook")
index adcfee1d69fd76b488b0e5c640b65fdb89d162f1..420098b5009b2c066c054622d6f39b6ca529b511 100644 (file)
@@ -110,7 +110,7 @@ USA.
     (make-cursor block start symbol-table)))
 
 (define (write-instructions cursor)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (let ((end (compiled-code-block/code-end (cursor-block cursor))))
        (let loop ()
@@ -219,7 +219,7 @@ USA.
               #t)))))
 \f
 (define (write-constants cursor)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (let* ((block (cursor-block cursor))
             (end (compiled-code-block/index->offset
index d143c002da48a7113f2a3946efba4cd19897ae56..d591471465203c1856924e16a8f3325f34a322b9 100644 (file)
@@ -244,7 +244,7 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*)
+         param:unparse-uninterned-symbols-by-name?)
   (import (scode-optimizer build-utilities)
          directory-processor))
 \f
@@ -266,7 +266,7 @@ USA.
   (import (runtime pretty-printer)
          *pp-primitives-by-name*)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         param:unparse-uninterned-symbols-by-name?))
 
 (define-package (compiler pattern-matcher/lookup)
   (files "base/pmlook")
index b9e7b401bc5735aaa9485059173e7e524694fda7..bbbaf09c6236b6377d2b67719461fc63f03933f0 100644 (file)
@@ -105,7 +105,7 @@ USA.
   (disassembler/instructions false start-address end-address false))
 
 (define (disassembler/write-instruction-stream symbol-table instruction-stream)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (disassembler/for-each-instruction instruction-stream
        (lambda (offset instruction)
@@ -122,7 +122,7 @@ USA.
            (loop (instruction-stream)))))))
 \f
 (define (disassembler/write-constants-block block symbol-table)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (let ((end (system-vector-length block)))
        (let loop ((index (compiled-code-block/constants-start block)))
index 1b0f4334ba769e9b555204f29e9cf26b9ee9d84d..24c1849f3e76c0b11503ffd1802aaece4f295bf8 100644 (file)
@@ -272,7 +272,7 @@ USA.
          make-dbg-info-vector
          split-inf-structure!)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*)
+         param:unparse-uninterned-symbols-by-name?)
   (import (scode-optimizer build-utilities)
          directory-processor))
 \f
@@ -294,7 +294,7 @@ USA.
   (import (runtime pretty-printer)
          *pp-primitives-by-name*)
   (import (runtime unparser)
-         *unparse-uninterned-symbols-by-name?*))
+         param:unparse-uninterned-symbols-by-name?))
 
 (define-package (compiler pattern-matcher/lookup)
   (files "base/pmlook")
index 880ac54589de702ebb80a3bc5ffaa83c6b49d4df..98a41d07f30d9a92fda87cf27c8cae9cc44718a6 100644 (file)
@@ -117,7 +117,7 @@ USA.
   (disassembler/instructions #f start-address end-address #f))
 
 (define (disassembler/write-instruction-stream symbol-table instruction-stream)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (disassembler/for-each-instruction instruction-stream
        (lambda (offset instruction comment)
@@ -144,7 +144,7 @@ USA.
            (loop (instruction-stream)))))))
 \f
 (define (disassembler/write-constants-block block symbol-table)
-  (parameterize* (list (cons *unparser-radix* 16))
+  (parameterize* (list (cons param:unparser-radix 16))
     (lambda ()
       (let ((end (system-vector-length block)))
        (let loop ((index (compiled-code-block/marked-start block)))
index 8cb1be85f24cbcd69bdd540f4f32387d56953d4e..32d7552e7161de0a959a35148b220ec3797baac9 100644 (file)
@@ -1013,7 +1013,7 @@ Prefix argument means do not kill the debugger buffer."
        port))))
 
 (define (print-with-subexpression expression subexpression)
-  (parameterize* (list (cons *unparse-primitives-by-name?* #t))
+  (parameterize* (list (cons param:unparse-primitives-by-name? #t))
     (lambda ()
       (if (invalid-subexpression? subexpression)
          (write (unsyntax expression))
@@ -1043,7 +1043,7 @@ Prefix argument means do not kill the debugger buffer."
    port))
 
 (define (print-reduction-as-subexpression expression)
-  (parameterize* (list (cons *unparse-primitives-by-name?* #t))
+  (parameterize* (list (cons param:unparse-primitives-by-name? #t))
     (lambda ()
       (write-string (ref-variable subexpression-start-marker))
       (write (unsyntax expression))
index 7cbeb937d4c5f87bf9eba4af397de96d747b826d..a309884e1cca789f130537ab2085214cdbdd568a 100644 (file)
@@ -1291,7 +1291,8 @@ it has been renamed, it will not be deleted automatically.")
            (cond ((debugging-info/compiled-code? expression)
                   (write-string ";unknown compiled code" port))
                  ((not (debugging-info/undefined-expression? expression))
-                  (parameterize* (list (cons *unparse-primitives-by-name?* #t))
+                  (parameterize* (list (cons param:unparse-primitives-by-name?
+                                             #t))
                     (lambda ()
                       (write
                        (unsyntax (if (invalid-subexpression? subexpression)
@@ -1382,7 +1383,7 @@ it has been renamed, it will not be deleted automatically.")
            (subproblem/number (reduction/subproblem reduction)))
           port)))
     (write-string " " port)
-    (parameterize* (list (cons *unparse-primitives-by-name?* #t))
+    (parameterize* (list (cons param:unparse-primitives-by-name? #t))
       (lambda ()
        (write (unsyntax (reduction/expression reduction)) port)))))
 
index 19ef0eca2d0ee3aa8e4559ec8dc0ccb3804f082e..1767df90f217161419c49c1eb3f8208839e9307a 100644 (file)
@@ -234,7 +234,7 @@ The values are printed in the typein window."
                  (lambda (buffer)
                    (insert-string
                     (parameterize*
-                     (list (cons *unparse-with-maximum-readability?* #t))
+                     (list (cons param: #t))
                      (lambda ()
                        (write-to-string expression)))
                     (buffer-end buffer)))))
@@ -528,9 +528,9 @@ Set by Scheme evaluation code to update the mode line."
 (define (transcript-value-string value)
   (if (undefined-value? value)
       ""
-      (parameterize* (list (cons *unparser-list-depth-limit*
+      (parameterize* (list (cons param:unparser-list-depth-limit
                                 (ref-variable transcript-list-depth-limit))
-                          (cons *unparser-list-breadth-limit*
+                          (cons param:unparser-list-breadth-limit
                                 (ref-variable transcript-list-breadth-limit)))
        (lambda ()
          (write-to-string value)))))
index b7427f8472e3083d271cca5478e6a86d70d78ee9..4fbc2e738a82e37b8d555ff1d9830d98e6c32c24 100644 (file)
@@ -727,7 +727,8 @@ If this is an error, the debugger examines the error condition."
     (lambda (mark)
       (if mark
          (insert-string
-          (parameterize* (list (cons *unparse-with-maximum-readability?* #t))
+          (parameterize* (list (cons param:unparse-with-maximum-readability?
+                                     #t))
             (lambda ()
               (write-to-string expression)))
           mark))))
index b3b89ea8c64571ccf88906e83dd328c7c0d1e953..3f605e4bf62d55f84bc40efb5639ff3bfc627eba 100644 (file)
@@ -978,7 +978,7 @@ it is added to the front of the command history."
     (set-prompt-history-strings!
      'REPEAT-COMPLEX-COMMAND
      (map (lambda (command)
-           (parameterize* (list (cons *unparse-with-maximum-readability?* #t))
+           (parameterize* (list (cons param:unparse-with-maximum-readability? #t))
              (lambda ()
                (write-to-string command))))
          (command-history-list)))
index 8eb020c3e239acf48980dadb58b6324dc48f815c..54ed279950c49077907ad276b7401640b7f430b6 100644 (file)
@@ -327,7 +327,7 @@ Otherwise, it is shown in the echo area."
                               (insert-string " . " point)
                               (insert-string (symbol-name argl) point)))))
                    (parameterize*
-                    (list (cons *unparse-uninterned-symbols-by-name?* #t))
+                    (list (cons param:unparse-uninterned-symbols-by-name? #t))
                     (lambda ()
                       (message procedure-name ": " argl)))))
              (editor-error "Expression does not evaluate to a procedure: "
index 0ba8e8f59eb820a59673fa2ac156199855a3e199..80997d75e31b7a0d993d42d7340ec7231dca15d2 100644 (file)
@@ -63,7 +63,7 @@ USA.
   (lambda (state object)
     (let ((port (unparser-state/port state))
          (hash-string (number->string (hash object))))
-      (if (*unparse-with-maximum-readability?*)
+      (if (get-param:unparse-with-maximum-readability?)
          (begin
            (write-string "#@" port)
            (write-string hash-string port))
index 892a8f2007e36f4f3470f2452c12e7064d86a1a7..c5c90823543c232593ea8dcf6dcc77c701f01f9a 100644 (file)
@@ -474,7 +474,7 @@ USA.
          (output-to-string
           50
           (lambda ()
-            (parameterize* (list (cons *unparse-primitives-by-name?* true))
+            (parameterize* (list (cons param:unparse-primitives-by-name? #t))
               (lambda ()
                 (write (unsyntax expression)))))))
         ((debugging-info/noise? expression)
@@ -956,11 +956,11 @@ using the read-eval-print environment instead.")
   (string-capitalize (if reason (string-append reason "; " message) message)))
 
 (define (debugger-pp expression indentation port)
-  (parameterize* (list (cons *unparser-list-depth-limit*
+  (parameterize* (list (cons param:unparser-list-depth-limit
                             debugger:list-depth-limit)
-                      (cons *unparser-list-breadth-limit*
+                      (cons param:unparser-list-breadth-limit
                             debugger:list-breadth-limit)
-                      (cons *unparser-string-length-limit*
+                      (cons param:unparser-string-length-limit
                             debugger:string-length-limit))
     (lambda ()
       (pretty-print expression port true indentation))))
index 43f1d1a96f248e07781f692e51e1a5b0381c40ac..b132d71da92011aa6a16512e9bca73cfa05b3402 100644 (file)
@@ -1268,8 +1268,8 @@ USA.
              (else (error "Unexpected value:" v)))))))
 
 (define (format-error-message message irritants port)
-  (parameterize* (list (cons *unparser-list-depth-limit* 2)
-                      (cons *unparser-list-breadth-limit* 5))
+  (parameterize* (list (cons param:unparser-list-depth-limit 2)
+                      (cons param:unparser-list-breadth-limit 5))
     (lambda ()
       (for-each (lambda (irritant)
                  (if (and (pair? irritant)
index dfb966017a6873c71d612a69ff5a3712a35a161e..e39f320f5dd847b79e124427100a590453b05e23 100644 (file)
@@ -234,11 +234,11 @@ USA.
                             (- (or (*pp-forced-x-size*)
                                    (output-port/x-size port)) 1))
                       (cons output-port port)
-                      (cons *unparse-uninterned-symbols-by-name?*
+                      (cons param:unparse-uninterned-symbols-by-name?
                             (*pp-uninterned-symbols-by-name*))
-                      (cons *unparse-abbreviate-quotations?*
+                      (cons param:unparse-abbreviate-quotations?
                             (or as-code?
-                                (*unparse-abbreviate-quotations?*))))
+                                (param:unparse-abbreviate-quotations?))))
     (lambda ()
       (let* ((numerical-walk
              (if (*pp-avoid-circularity?*)
@@ -718,14 +718,14 @@ USA.
               object))))
 \f
 (define (walk-pair pair list-depth)
-  (if (let ((limit (*unparser-list-depth-limit*)))
+  (if (let ((limit (get-param:unparser-list-depth-limit)))
        (and limit
             (>= list-depth limit)
             (no-highlights? pair)))
       "..."
       (let ((list-depth (+ list-depth 1)))
        (let loop ((pair pair) (list-breadth 0))
-         (cond ((let ((limit (*unparser-list-breadth-limit*)))
+         (cond ((let ((limit (get-param:unparser-list-breadth-limit)))
                   (and limit
                        (>= list-breadth limit)
                        (no-highlights? pair)))
@@ -743,7 +743,8 @@ USA.
                        (make-list-node
                         "."
                         (make-singleton-list-node
-                         (if (let ((limit (*unparser-list-breadth-limit*)))
+                         (if (let ((limit
+                                    (get-param:unparser-list-breadth-limit)))
                                (and limit
                                     (>= list-breadth limit)
                                     (no-highlights? pair)))
@@ -768,14 +769,14 @@ USA.
 
 (define (walk-highlighted-object object list-depth numerical-walk)
   (let ((dl (pph/depth-limit object)))
-    (parameterize* (list (cons *unparser-list-breadth-limit*
+    (parameterize* (list (cons param:unparser-list-breadth-limit
                               (let ((bl (pph/breadth-limit object)))
                                 (if (eq? bl 'DEFAULT)
-                                    (*unparser-list-breadth-limit*)
+                                    (param:unparser-list-breadth-limit)
                                     bl)))
-                        (cons *unparser-list-depth-limit*
+                        (cons param:unparser-list-depth-limit
                               (if (eq? dl 'DEFAULT)
-                                  (*unparser-list-depth-limit*)
+                                  (param:unparser-list-depth-limit)
                                   dl)))
       (lambda ()
        (numerical-walk (pph/object object)
@@ -859,7 +860,7 @@ USA.
 ;;; The following two procedures walk lists and vectors, respectively.
 
 (define (walk-pair-terminating pair half-pointer/queue list-depth)
-  (if (let ((limit (*unparser-list-depth-limit*)))
+  (if (let ((limit (get-param:unparser-list-depth-limit)))
        (and limit
             (>= list-depth limit)
             (no-highlights? pair)))
@@ -867,7 +868,7 @@ USA.
       (let ((list-depth (+ list-depth 1)))
        (let loop ((pair pair) (list-breadth 0)
                               (half-pointer/queue half-pointer/queue))
-         (cond ((let ((limit (*unparser-list-breadth-limit*)))
+         (cond ((let ((limit (get-param:unparser-list-breadth-limit)))
                   (and limit
                        (>= list-breadth limit)
                        (no-highlights? pair)))
@@ -910,7 +911,7 @@ USA.
                      "."
                      (make-singleton-list-node
                       (if
-                       (let ((limit (*unparser-list-breadth-limit*)))
+                       (let ((limit (get-param:unparser-list-breadth-limit)))
                          (and limit
                               (>= list-breadth limit)
                               (no-highlights? pair)))
@@ -927,14 +928,14 @@ USA.
                               half-pointer/queue list-depth)))))))))))))))
 \f
 (define (walk-vector-terminating pair half-pointer/queue list-depth)
-  (if (let ((limit (*unparser-list-depth-limit*)))
+  (if (let ((limit (get-param:unparser-list-depth-limit)))
        (and limit
             (>= list-depth limit)
             (no-highlights? pair)))
       "..."
       (let ((list-depth (+ list-depth 1)))
        (let loop ((pair pair) (list-breadth 0))
-         (cond ((let ((limit (*unparser-list-breadth-limit*)))
+         (cond ((let ((limit (get-param:unparser-list-breadth-limit)))
                   (and limit
                        (>= list-breadth limit)
                        (no-highlights? pair)))
@@ -967,7 +968,7 @@ USA.
                         "."
                         (make-singleton-list-node
                          (if (let ((limit
-                                    (*unparser-list-breadth-limit*)))
+                                    (get-param:unparser-list-breadth-limit)))
                                (and limit
                                     (>= list-breadth limit)
                                     (no-highlights? pair)))
index b8fef388a5b5dc712d0ca3ab6393d8fd78ce21f2..d70e5cb6c3658e9974b0920504f765d2d0c17659 100644 (file)
@@ -543,11 +543,12 @@ USA.
      (or message
         (and condition
              (cmdl-message/strings
-              (parameterize* (list (cons *unparser-list-depth-limit* 25)
-                                   (cons *unparser-list-breadth-limit* 100)
-                                   (cons *unparser-string-length-limit* 500))
-                (lambda ()
-                  (condition/report-string condition))))))
+              (parameterize*
+               (list (cons param:unparser-list-depth-limit 25)
+                     (cons param:unparser-list-breadth-limit 100)
+                     (cons param:unparser-string-length-limit 500))
+               (lambda ()
+                 (condition/report-string condition))))))
      (and condition
          repl:allow-restart-notifications?
          (condition-restarts-message condition))
index 1c1bc0fd46d0197e7fce2fc1a22b175a6ea427c2..5a2c28574318fc6c5df42d82d703908ebb37c987 100644 (file)
@@ -5013,6 +5013,18 @@ USA.
          guarantee-unparser-state
          guarantee-unparser-table
          make-unparser-table
+         param:unparse-abbreviate-quotations?
+         param:unparse-compound-procedure-names?
+         param:unparse-primitives-by-name?
+         param:unparse-streams?
+         param:unparse-uninterned-symbols-by-name?
+         param:unparse-with-datum?
+         param:unparse-with-maximum-readability?
+         param:unparser-list-breadth-limit
+         param:unparser-list-depth-limit
+         param:unparser-radix
+         param:unparser-string-length-limit
+         param:unparser-table
          system-global-unparser-table
          unparse-char
          unparse-object
@@ -5025,11 +5037,15 @@ USA.
          unparser-table?
          user-object-type
          with-current-unparser-state)
+  (export (runtime boot-definitions)
+         get-param:unparse-with-maximum-readability?)
   (export (runtime record)
          rtd:unparser-state)
   (export (runtime output-port)
          unparse-object/top-level)
   (export (runtime pretty-printer)
+         get-param:unparser-list-breadth-limit
+         get-param:unparser-list-depth-limit
          make-unparser-state
          unparse-list/prefix-pair?
          unparse-list/unparser
index 1f7897ac6a924d6c6febfcfbcdd6d62be41bb907..b8a0e25daab27f2dc70ad15ab32ac4bf8186e63a 100644 (file)
 
 (define (profile-pp expression output-port)
   ;; Random parametrization.
-  (parameterize* (list (cons *unparser-list-breadth-limit* 5)
-                      (cons *unparser-list-depth-limit* 3)
-                      (cons *unparser-string-length-limit* 40)
-                      (cons *unparse-primitives-by-name?* #t)
+  (parameterize* (list (cons param:unparser-list-breadth-limit 5)
+                      (cons param:unparser-list-depth-limit 3)
+                      (cons param:unparser-string-length-limit 40)
+                      (cons param:unparse-primitives-by-name? #t)
                       (cons *pp-save-vertical-space?* #t)
                       (cons *pp-default-as-code?* #t))
     (lambda ()
index fff7518402a048cbbe16d9c3c588a3ad020c01a6..10ee4025e63c43e6c5644ec087a28d5ced8d0114 100644 (file)
@@ -760,7 +760,7 @@ swank:xref
     (cond ((debugging-info/compiled-code? expression)
           (write-string ";unknown compiled code" port))
          ((not (debugging-info/undefined-expression? expression))
-          (parameterize* (list (cons *unparse-primitives-by-name?* #t))
+          (parameterize* (list (cons param:unparse-primitives-by-name? #t))
             (lambda ()
               (write
                (unsyntax
@@ -1112,9 +1112,9 @@ swank:xref
 (define (pprint-to-string o)
   (call-with-output-string
     (lambda (p)
-      (parameterize* (list (cons *unparser-list-breadth-limit* 10)
-                          (cons *unparser-list-depth-limit* 4)
-                          (cons *unparser-string-length-limit* 100))
+      (parameterize* (list (cons param:unparser-list-breadth-limit 10)
+                          (cons param:unparser-list-depth-limit 4)
+                          (cons param:unparser-string-length-limit 100))
        (lambda ()
          (pp o p))))))
 
index 380c353d16b802ba1b34bb9dd7091b3848a33386..4063fc368ecfc1083a2bf6b306272f35899b20ca 100644 (file)
@@ -29,56 +29,143 @@ USA.
 
 (declare (usual-integrations))
 \f
+(define hook/interned-symbol)
+(define hook/procedure-unparser)
+(define string-delimiters)
+(define non-canon-symbol-quoted)
+(define canon-symbol-quoted)
+(define system-global-unparser-table)
+
+(define *unparse-abbreviate-quotations?* #!default)
+(define *unparse-compound-procedure-names?* #!default)
+(define *unparse-primitives-by-name?* #!default)
+(define *unparse-streams?* #!default)
+(define *unparse-uninterned-symbols-by-name?* #!default)
+(define *unparse-with-datum?* #!default)
+(define *unparse-with-maximum-readability?* #!default)
+(define *unparser-list-breadth-limit* #!default)
+(define *unparser-list-depth-limit* #!default)
+(define *unparser-radix* #!default)
+(define *unparser-string-length-limit* #!default)
+(define *unparser-table* #!default)
+
+(define param:unparse-abbreviate-quotations?)
+(define param:unparse-compound-procedure-names?)
+(define param:unparse-primitives-by-name?)
+(define param:unparse-streams?)
+(define param:unparse-uninterned-symbols-by-name?)
+(define param:unparse-with-datum?)
+(define param:unparse-with-maximum-readability?)
+(define param:unparser-list-breadth-limit)
+(define param:unparser-list-depth-limit)
+(define param:unparser-radix)
+(define param:unparser-string-length-limit)
+(define param:unparser-table)
+
+(define param:default-unparser-state)
+(define param:dispatch-table)
+(define param:environment)
+(define param:list-depth)
+(define param:output-port)
+(define param:slashify?)
+;; Dynamically bound to #t if we are already unparsing a bracketed
+;; object so we can avoid nested brackets.
+(define param:unparsing-within-brackets?)
+
 (define (initialize-package!)
-  (set! string-delimiters
-        (char-set-union char-set:not-graphic (char-set #\" #\\)))
   (set! hook/interned-symbol unparse-symbol)
   (set! hook/procedure-unparser #f)
-  (set! *unparser-radix* (make-parameter 10))
-  (set! *unparser-list-breadth-limit* (make-parameter #f))
-  (set! *unparser-list-depth-limit* (make-parameter #f))
-  (set! *unparser-string-length-limit* (make-parameter #f))
-  (set! *unparse-primitives-by-name?* (make-parameter #f))
-  (set! *unparse-uninterned-symbols-by-name?* (make-parameter #f))
-  (set! *unparse-with-maximum-readability?* (make-parameter #f))
-  (set! *unparse-compound-procedure-names?* (make-parameter #t))
-  (set! *unparse-with-datum?* (make-parameter #f))
-  (set! *unparse-abbreviate-quotations?* (make-parameter #f))
-  (set! *unparse-streams?* (make-parameter #t))
-  (set! system-global-unparser-table (make-system-global-unparser-table))
-  (set! *unparser-table* (make-parameter system-global-unparser-table))
-  (set! *default-unparser-state* (make-parameter #f))
+  (set! string-delimiters
+        (char-set-union char-set:not-graphic (char-set #\" #\\)))
   (set! non-canon-symbol-quoted
-        (char-set-union char-set/atom-delimiters
-                        char-set/symbol-quotes))
+        (char-set-union char-set/atom-delimiters char-set/symbol-quotes))
   (set! canon-symbol-quoted
-        (char-set-union non-canon-symbol-quoted
-                        char-set:upper-case))
-  (set! *unparsing-within-brackets* (make-parameter #f))
-  (set! *list-depth* (make-parameter #f))
-  (set! *output-port* (make-parameter #f))
-  (set! *slashify?* (make-parameter #f))
-  (set! *environment* (make-parameter #f))
-  (set! *dispatch-table* (make-parameter #f))
-  unspecific)
-
-(define *unparser-radix*)
-(define *unparser-list-breadth-limit*)
-(define *unparser-list-depth-limit*)
-(define *unparser-string-length-limit*)
-(define *unparse-primitives-by-name?*)
-(define *unparse-uninterned-symbols-by-name?*)
-(define *unparse-with-maximum-readability?*)
-(define *unparse-compound-procedure-names?*)
-(define *unparse-with-datum?*)
-(define *unparse-abbreviate-quotations?*)
-(define *unparse-streams?*)
-(define system-global-unparser-table)
-(define *unparser-table*)
-(define *default-unparser-state*)
-(define non-canon-symbol-quoted)
-(define canon-symbol-quoted)
+        (char-set-union non-canon-symbol-quoted char-set:upper-case))
+  (set! system-global-unparser-table (make-system-global-unparser-table))
 
+  (set! param:unparse-abbreviate-quotations? (make-settable-parameter #f))
+  (set! param:unparse-compound-procedure-names? (make-settable-parameter #t))
+  (set! param:unparse-primitives-by-name? (make-settable-parameter #f))
+  (set! param:unparse-streams? (make-settable-parameter #t))
+  (set! param:unparse-uninterned-symbols-by-name? (make-settable-parameter #f))
+  (set! param:unparse-with-datum? (make-settable-parameter #f))
+  (set! param:unparse-with-maximum-readability? (make-settable-parameter #f))
+  (set! param:unparser-list-breadth-limit (make-settable-parameter #f))
+  (set! param:unparser-list-depth-limit (make-settable-parameter #f))
+  (set! param:unparser-radix (make-settable-parameter 10))
+  (set! param:unparser-string-length-limit (make-settable-parameter #f))
+  (set! param:unparser-table
+       (make-settable-parameter system-global-unparser-table))
+
+  (set! param:default-unparser-state (make-unsettable-parameter #f))
+  (set! param:dispatch-table (make-unsettable-parameter #f))
+  (set! param:environment (make-unsettable-parameter #f))
+  (set! param:list-depth (make-unsettable-parameter #f))
+  (set! param:output-port (make-unsettable-parameter #f))
+  (set! param:slashify? (make-unsettable-parameter #f))
+  (set! param:unparsing-within-brackets? (make-unsettable-parameter #f))
+  unspecific)
+\f
+(define (get-param:unparse-abbreviate-quotations?)
+  (if (default-object? *unparse-abbreviate-quotations?*)
+      (param:unparse-abbreviate-quotations?)
+      *unparse-abbreviate-quotations?*))
+
+(define (get-param:unparse-compound-procedure-names?)
+  (if (default-object? *unparse-compound-procedure-names?*)
+      (param:unparse-compound-procedure-names?)
+      *unparse-compound-procedure-names?*))
+
+(define (get-param:unparse-primitives-by-name?)
+  (if (default-object? *unparse-primitives-by-name?*)
+      (param:unparse-primitives-by-name?)
+      *unparse-primitives-by-name?*))
+
+(define (get-param:unparse-streams?)
+  (if (default-object? *unparse-streams?*)
+      (param:unparse-streams?)
+      *unparse-streams?*))
+
+(define (get-param:unparse-uninterned-symbols-by-name?)
+  (if (default-object? *unparse-uninterned-symbols-by-name?*)
+      (param:unparse-uninterned-symbols-by-name?)
+      *unparse-uninterned-symbols-by-name?*))
+
+(define (get-param:unparse-with-datum?)
+  (if (default-object? *unparse-with-datum?*)
+      (param:unparse-with-datum?)
+      *unparse-with-datum?*))
+
+(define (get-param:unparse-with-maximum-readability?)
+  (if (default-object? *unparse-with-maximum-readability?*)
+      (param:unparse-with-maximum-readability?)
+      *unparse-with-maximum-readability?*))
+
+(define (get-param:unparser-list-breadth-limit)
+  (if (default-object? *unparser-list-breadth-limit*)
+      (param:unparser-list-breadth-limit)
+      *unparser-list-breadth-limit*))
+
+(define (get-param:unparser-list-depth-limit)
+  (if (default-object? *unparser-list-depth-limit*)
+      (param:unparser-list-depth-limit)
+      *unparser-list-depth-limit*))
+
+(define (get-param:unparser-radix)
+  (if (default-object? *unparser-radix*)
+      (param:unparser-radix)
+      *unparser-radix*))
+
+(define (get-param:unparser-string-length-limit)
+  (if (default-object? *unparser-string-length-limit*)
+      (param:unparser-string-length-limit)
+      *unparser-string-length-limit*))
+
+(define (get-param:unparser-table)
+  (if (default-object? *unparser-table*)
+      (param:unparser-table)
+      *unparser-table*))
+\f
 (define (make-system-global-unparser-table)
   (let ((table (make-unparser-table unparse/default)))
     (for-each (lambda (entry)
@@ -146,7 +233,7 @@ USA.
 
 (define (with-current-unparser-state state procedure)
   (guarantee-unparser-state state 'WITH-CURRENT-UNPARSER-STATE)
-  (parameterize* (list (cons *default-unparser-state* state))
+  (parameterize* (list (cons param:default-unparser-state state))
     (lambda ()
       (procedure (unparser-state/port state)))))
 \f
@@ -169,7 +256,7 @@ USA.
                            (unparser-state/environment state)))
 
 (define (unparse-object/top-level object port slashify? environment)
-  (let ((state (*default-unparser-state*)))
+  (let ((state (param:default-unparser-state)))
     (unparse-object/internal
      object
      port
@@ -187,47 +274,40 @@ USA.
            environment)))))
 
 (define (unparse-object/internal object port list-depth slashify? environment)
-  (parameterize* (list (cons *list-depth* list-depth)
-                      (cons *output-port* port)
-                      (cons *slashify?* slashify?)
-                      (cons *environment* environment)
-                      (cons *dispatch-table*
+  (parameterize* (list (cons param:list-depth list-depth)
+                      (cons param:output-port port)
+                      (cons param:slashify? slashify?)
+                      (cons param:environment environment)
+                      (cons param:dispatch-table
                             (unparser-table/dispatch-vector
-                             (let ((table (*unparser-table*)))
+                             (let ((table (get-param:unparser-table)))
                                (guarantee-unparser-table table #f)
                                table))))
     (lambda ()
       (*unparse-object object))))
 
 (define-integrable (invoke-user-method method object)
-  (method (make-unparser-state (*output-port*)
-                               (*list-depth*)
-                               (*slashify?*)
-                               (*environment*))
+  (method (make-unparser-state (param:output-port)
+                               (param:list-depth)
+                               (param:slashify?)
+                               (param:environment))
           object))
 
-(define *list-depth*)
-(define *slashify?*)
-(define *environment*)
-(define *dispatch-table*)
-
 (define (*unparse-object object)
-  ((vector-ref (*dispatch-table*)
+  ((vector-ref (param:dispatch-table)
                ((ucode-primitive primitive-object-type 1) object))
    object))
 \f
 ;;;; Low Level Operations
 
-(define *output-port*)
-
 (define-integrable (*unparse-char char)
-  (output-port/write-char (*output-port*) char))
+  (output-port/write-char (param:output-port) char))
 
 (define-integrable (*unparse-string string)
-  (output-port/write-string (*output-port*) string))
+  (output-port/write-string (param:output-port) string))
 
 (define-integrable (*unparse-substring string start end)
-  (output-port/write-substring (*output-port*) string start end))
+  (output-port/write-substring (param:output-port) string start end))
 
 (define-integrable (*unparse-datum object)
   (*unparse-hex (object-datum object)))
@@ -243,27 +323,23 @@ USA.
   (*unparse-string "#@")
   (*unparse-hash object))
 
-;; Dynamically bound to #T if we are already unparsing a bracketed
-;; object so we can avoid nested brackets.
-(define *unparsing-within-brackets*)
-
 ;; Values to use while unparsing within brackets.
 (define within-brackets-list-breadth-limit 5)
 (define within-brackets-list-depth-limit 3)
 
 (define (*unparse-with-brackets name object thunk)
-  (if (or (and (*unparse-with-maximum-readability?*) object)
-          (*unparsing-within-brackets*))
+  (if (or (and (get-param:unparse-with-maximum-readability?) object)
+          (param:unparsing-within-brackets?))
       (*unparse-readable-hash object)
-      (parameterize* (list (cons *unparsing-within-brackets* #t)
-                          (cons *unparser-list-breadth-limit*
-                                (if (*unparser-list-breadth-limit*)
-                                    (min (*unparser-list-breadth-limit*)
+      (parameterize* (list (cons param:unparsing-within-brackets? #t)
+                          (cons param:unparser-list-breadth-limit
+                                (if (get-param:unparser-list-breadth-limit)
+                                    (min (get-param:unparser-list-breadth-limit)
                                          within-brackets-list-breadth-limit)
                                     within-brackets-list-breadth-limit))
-                          (cons *unparser-list-depth-limit*
-                                (if (*unparser-list-depth-limit*)
-                                    (min (*unparser-list-depth-limit*)
+                          (cons param:unparser-list-depth-limit
+                                (if (get-param:unparser-list-depth-limit)
+                                    (min (get-param:unparser-list-depth-limit)
                                          within-brackets-list-depth-limit)
                                     within-brackets-list-depth-limit)))
        (lambda ()
@@ -279,7 +355,7 @@ USA.
              (begin
                (*unparse-char #\space)
                (limit-unparse-depth thunk))
-             (if (*unparse-with-datum?*)
+             (if (get-param:unparse-with-datum?)
                  (begin
                    (*unparse-char #\space)
                    (*unparse-datum object))))
@@ -353,10 +429,8 @@ USA.
 (define (unparse/interned-symbol symbol)
   (hook/interned-symbol symbol))
 
-(define hook/interned-symbol)
-
 (define (unparse/uninterned-symbol symbol)
-  (if (*unparse-uninterned-symbols-by-name?*)
+  (if (get-param:unparse-uninterned-symbols-by-name?)
       (unparse-symbol symbol)
       (*unparse-with-brackets 'UNINTERNED-SYMBOL symbol
         (lambda ()
@@ -368,7 +442,7 @@ USA.
       (unparse-symbol-name (symbol-name symbol))))
 
 (define (unparse-keyword-name s)
-  (case (get-param:parser-keyword-style (*environment*))
+  (case (get-param:parser-keyword-style (param:environment))
     ((PREFIX)
      (*unparse-char #\:)
      (unparse-symbol-name s))
@@ -383,7 +457,7 @@ USA.
 (define (unparse-symbol-name s)
   (if (or (string-find-next-char-in-set
            s
-           (if (get-param:parser-canonicalize-symbols? (*environment*))
+           (if (get-param:parser-canonicalize-symbols? (param:environment))
                canon-symbol-quoted
                non-canon-symbol-quoted))
           (fix:= (string-length s) 0)
@@ -416,7 +490,7 @@ USA.
   (char=? (string-ref string 0) #\#))
 
 (define (looks-like-keyword? string)
-  (case (get-param:parser-keyword-style (*environment*))
+  (case (get-param:parser-keyword-style (param:environment))
     ((PREFIX)
      (char=? (string-ref string 0) #\:))
     ((SUFFIX)
@@ -424,7 +498,7 @@ USA.
     (else #f)))
 
 (define (unparse/character character)
-  (if (or (*slashify?*)
+  (if (or (param:slashify?)
           (not (char-ascii? character)))
       (begin
         (*unparse-string "#\\")
@@ -432,10 +506,10 @@ USA.
       (*unparse-char character)))
 \f
 (define (unparse/string string)
-  (if (*slashify?*)
+  (if (param:slashify?)
       (let ((end (string-length string)))
         (let ((end*
-               (let ((limit (*unparser-string-length-limit*)))
+               (let ((limit (get-param:unparser-string-length-limit)))
                  (if limit
                      (min limit end)
                      end))))
@@ -485,8 +559,6 @@ USA.
               (digit->char (integer-divide-remainder qr2) 8)
               (digit->char (integer-divide-remainder qr1) 8)))))
 
-(define string-delimiters)
-
 (define (unparse/bit-string bit-string)
   (*unparse-string "#*")
   (let loop ((index (fix:- (bit-string-length bit-string) 1)))
@@ -524,7 +596,7 @@ USA.
              (let loop ((index 1))
                (cond ((fix:= index length)
                       (*unparse-char #\)))
-                     ((let ((limit (*unparser-list-breadth-limit*)))
+                     ((let ((limit (get-param:unparser-list-breadth-limit)))
                         (and limit (>= index limit)))
                       (*unparse-string " ...)"))
                      (else
@@ -542,7 +614,7 @@ USA.
   (map-reference-trap (lambda () (vector-ref vector index))))
 
 (define (unparse/record record)
-  (if (*unparse-with-maximum-readability?*)
+  (if (get-param:unparse-with-maximum-readability?)
       (*unparse-readable-hash record)
       (invoke-user-method unparse-record record)))
 \f
@@ -551,7 +623,7 @@ USA.
          => (lambda (prefix) (unparse-list/prefix-pair prefix pair)))
         ((unparse-list/unparser pair)
          => (lambda (method) (invoke-user-method method pair)))
-        ((and (*unparse-streams?*) (stream-pair? pair))
+        ((and (get-param:unparse-streams?) (stream-pair? pair))
          (unparse-list/stream-pair pair))
         (else
          (unparse-list pair))))
@@ -565,10 +637,10 @@ USA.
      (*unparse-char #\)))))
 
 (define (limit-unparse-depth kernel)
-  (let ((limit (*unparser-list-depth-limit*)))
+  (let ((limit (get-param:unparser-list-depth-limit)))
     (if limit
-        (let ((depth (*list-depth*)))
-          (parameterize* (list (cons *list-depth* (1+ depth)))
+        (let ((depth (param:list-depth)))
+          (parameterize* (list (cons param:list-depth (1+ depth)))
             (lambda ()
               (if (> (1+ depth) limit)
                   (*unparse-string "...")
@@ -585,7 +657,7 @@ USA.
                (begin
                  (*unparse-char #\space)
                  (*unparse-object (safe-car l))
-                 (if (let ((limit (*unparser-list-breadth-limit*)))
+                 (if (let ((limit (get-param:unparser-list-breadth-limit)))
                        (and limit
                             (>= n limit)
                             (pair? (safe-cdr l))))
@@ -609,7 +681,7 @@ USA.
   (*unparse-object (safe-car (safe-cdr pair))))
 
 (define (unparse-list/prefix-pair? object)
-  (and (*unparse-abbreviate-quotations?*)
+  (and (get-param:unparse-abbreviate-quotations?)
        (pair? (safe-cdr object))
        (null? (safe-cdr (safe-cdr object)))
        (case (safe-car object)
@@ -638,7 +710,7 @@ USA.
                       ((stream-pair? value)
                        (*unparse-char #\space)
                        (*unparse-object (safe-car value))
-                       (if (let ((limit (*unparser-list-breadth-limit*)))
+                       (if (let ((limit (get-param:unparser-list-breadth-limit)))
                              (and limit
                                   (>= n limit)))
                            (*unparse-string " ...")
@@ -655,8 +727,6 @@ USA.
 \f
 ;;;; Procedures
 
-(define hook/procedure-unparser)
-
 (define (unparse-procedure procedure usual-method)
   (let ((method
          (and hook/procedure-unparser
@@ -673,7 +743,7 @@ USA.
   (unparse-procedure procedure
     (lambda ()
       (*unparse-with-brackets 'COMPOUND-PROCEDURE procedure
-        (and (*unparse-compound-procedure-names?*)
+        (and (get-param:unparse-compound-procedure-names?)
              (lambda-components* (procedure-lambda procedure)
                (lambda (name required optional rest body)
                  required optional rest body
@@ -686,9 +756,9 @@ USA.
       (let ((unparse-name
              (lambda ()
                (*unparse-object (primitive-procedure-name procedure)))))
-        (cond ((*unparse-primitives-by-name?*)
+        (cond ((get-param:unparse-primitives-by-name?)
                (unparse-name))
-              ((*unparse-with-maximum-readability?*)
+              ((get-param:unparse-with-maximum-readability?)
                (*unparse-readable-hash procedure))
               (else
                (*unparse-with-brackets 'PRIMITIVE-PROCEDURE #f
@@ -770,7 +840,7 @@ USA.
                        (*unparse-string prefix))
                    radix)
                  10))))
-      (case (*unparser-radix*)
+      (case (get-param:unparser-radix)
         ((2) (prefix "#b" 2 2))
         ((8) (prefix "#o" 8 8))
         ((16) (prefix "#x" 10 16))
@@ -786,7 +856,7 @@ USA.
     (*unparse-with-brackets "floating-vector" v
       (and (not (zero? length))
            (lambda ()
-             (let ((limit (let ((limit (*unparser-list-breadth-limit*)))
+             (let ((limit (let ((limit (get-param:unparser-list-breadth-limit)))
                             (if (not limit)
                                 length
                                 (min length limit)))))
@@ -819,7 +889,7 @@ USA.
                        (compiled-procedure/name proc))
                   => named-arity-dispatched-procedure)
                  (else (plain 'ARITY-DISPATCHED-PROCEDURE)))))
-        ((*unparse-with-maximum-readability?*)
+        ((get-param:unparse-with-maximum-readability?)
          (*unparse-readable-hash entity))
         ((record? (%entity-extra entity))
          ;; Kludge to make the generic dispatch mechanism work.
@@ -844,7 +914,7 @@ USA.
          (*unparse-object (promise-value promise)))
        (lambda ()
          (*unparse-string "(unevaluated)")
-         (if (*unparse-with-datum?*)
+         (if (get-param:unparse-with-datum?)
              (begin
                (*unparse-char #\space)
                (*unparse-datum promise)))))))
\ No newline at end of file
index cec4b0bdf568adbbb89b4753c0991bafd79441ef..f145c88378d84992000da6089a7b9a0f1dbc77cf 100644 (file)
@@ -245,6 +245,6 @@ USA.
 (define (pp-expression form #!optional port)
   (parameterize* (list (cons *pp-primitives-by-name* #f)
                       (cons *pp-uninterned-symbols-by-name* #f)
-                      (cons *unparse-abbreviate-quotations?* #t))
+                      (cons param:unparse-abbreviate-quotations? #t))
     (lambda ()
       (pp (cgen/external-with-declarations form) port))))
\ No newline at end of file
index 8fffc1775df810a9a9b226a502d89ca50826db3f..670ca6dd555bf704be6e98f28e72fa20eab6b13e 100644 (file)
@@ -154,15 +154,13 @@ USA.
   (let ((newval (if (default-object? newval) false newval)))
     (if (not (or (not newval) (and (exact-integer? newval) (> newval 0))))
        (error:illegal-datum newval 'PRINT-DEPTH))
-    (*unparser-list-depth-limit* newval)
-    unspecific))
+    (param:unparser-list-depth-limit newval)))
 
 (define (print-breadth #!optional newval)
   (let ((newval (if (default-object? newval) false newval)))
     (if (not (or (not newval) (and (exact-integer? newval) (> newval 0))))
        (error:illegal-datum newval 'PRINT-BREADTH))
-    (*unparser-list-breadth-limit* newval)
-    unspecific))
+    (param:unparser-list-breadth-limit newval)))
 
 (define (ceiling->exact number)
   (inexact->exact (ceiling number)))
index 444aa5ab5b0bac245a0f36386691e18210f2139c..43c894bf9e579ded4aaef4db5737bf7afddc58c1 100644 (file)
@@ -2,8 +2,8 @@
 
 ;; to make this possible to debug
 
-; (*unparser-list-breadth-limit* 10)
-; (*unparser-list-depth-limit* 10)
+; (param:unparser-list-breadth-limit 10)
+; (param:unparser-list-depth-limit 10)
 
 
 ;; GC stress test
index 24a3f2a79371e227f7996fe12b512ed65753e814..0aafd43b8e2e21ee272353a2bd2bb4fbebb18574 100644 (file)
@@ -229,7 +229,7 @@ USA.
 
 (define (write-expr-property tag p port)
   (write-tag tag port)
-  (let-fluid *unparse-abbreviate-quotations?* #t
+  (parameterize* (list (cons param:unparse-abbreviate-quotations? #t))
     (lambda ()
       (write (cdr p) port))))