Eliminate use of with-values.
authorChris Hanson <org/chris-hanson/cph>
Thu, 5 Dec 2019 00:25:30 +0000 (16:25 -0800)
committerChris Hanson <org/chris-hanson/cph>
Mon, 9 Dec 2019 09:49:29 +0000 (01:49 -0800)
35 files changed:
src/6001/floppy.scm
src/compiler/back/lapgn1.scm
src/compiler/fggen/fggen.scm
src/compiler/fgopt/blktyp.scm
src/compiler/fgopt/delint.scm
src/compiler/fgopt/order.scm
src/compiler/fgopt/param.scm
src/compiler/fgopt/reuse.scm
src/compiler/improvements/gasn.scm
src/compiler/machines/C/ctop.scm
src/compiler/machines/C/stackify.scm
src/compiler/machines/i386/lapgen.scm
src/compiler/rtlgen/fndblk.scm
src/compiler/rtlgen/fndvar.scm
src/compiler/rtlgen/opncod.scm
src/compiler/rtlgen/rgproc.scm
src/compiler/rtlgen/rgrval.scm
src/compiler/rtlgen/rgstmt.scm
src/compiler/rtlgen/rtlgen.scm
src/compiler/rtlopt/rcompr.scm
src/compiler/rtlopt/rtlcsm.scm
src/edwin/artdebug.scm
src/edwin/bufwmc.scm
src/edwin/comred.scm
src/edwin/dabbrev.scm
src/edwin/edtfrm.scm
src/edwin/edtstr.scm
src/edwin/rmail.scm
src/edwin/things.scm
src/edwin/tterm.scm
src/runtime/conpar.scm
src/runtime/debug.scm
src/runtime/environment.scm
src/runtime/process.scm
src/runtime/xeval.scm

index 1089ec7b44d72194f633edc35857777a9f74f1e2..f0cb747bcf3ce63f3dd3ead6e0c719952bee5e53 100644 (file)
@@ -449,7 +449,7 @@ then answer \"yes\" to the prompt below.")
   (append-string "Copying files from working directory to floppy.\n")
   (let* ((working-directory (read-working-directory))
         (floppy-directory (read-floppy-directory)))
-    (with-values
+    (call-with-values
        (lambda ()
          (three-way-sort file-record/name=?
                          working-directory
@@ -620,7 +620,7 @@ M-x rename-file, or use the `r' command in Dired.")
              (let ((eol
                     (or (string-find-next-char string #\newline start end)
                         end)))
-               (with-values
+               (call-with-values
                    (lambda ()
                      (parse-dosls-line string start eol offset))
                  (lambda (filename time)
@@ -867,13 +867,13 @@ M-x rename-file, or use the `r' command in Dired.")
          (values '() '() set*)
          (let ((item (member? (car set) set*)))
            (if item
-               (with-values
+               (call-with-values
                    (lambda () (loop (cdr set) (delq! (car item) set*)))
                  (lambda (set-only both set*-only)
                    (values set-only
                            (cons (cons (car set) (car item)) both)
                            set*-only)))
-               (with-values (lambda () (loop (cdr set) set*))
+               (call-with-values (lambda () (loop (cdr set) set*))
                  (lambda (set-only both set*-only)
                    (values (cons (car set) set-only)
                            both
index 0d91933043f54ee200ad453d0da4fde1fd279f5f..cdfffe8160e4eed28abc97d074176243afcc97ea 100644 (file)
@@ -69,7 +69,7 @@ USA.
                          unspecific)
                        remote-links))
 
-         (with-values prepare-constants-block
+         (call-with-values prepare-constants-block
            (or process-constants-block
                (lambda (constants-code environment-label free-ref-label
                                        n-sections)
index 4629bcb136dbbd24b4226997991699a877bfd025..6dde3278b589256df147b56226b9e71a548d0620 100644 (file)
@@ -64,7 +64,7 @@ USA.
               (make-expression
                block
                continuation
-               (with-values
+               (call-with-values
                    (lambda ()
                      (let ((collect
                             (lambda (names declarations body)
index f92396736cbb76734269e20e7b5ddf4d0b17b0b0..8635f1750fc713bcf9d07fb5b645259640d468ec 100644 (file)
@@ -95,7 +95,7 @@ USA.
          (set-procedure-closure-context!
           procedure
           (make-reference-context original-parent))
-         (with-values
+         (call-with-values
              (lambda ()
                (let ((uninteresting-variable?
                       (lambda (variable)
@@ -465,7 +465,7 @@ USA.
                                 bound-variables
                                 variables-nontransitively-free)
             true)))
-      (with-values
+      (call-with-values
          (lambda ()
            (filter-bound-variables (block-bound-variables block)
                                    free-variables
index e1173b4ae160e6544d884561758aed548ce93a45..c3d6de76229ee922d2fdc8d1e346ac28b6a56775 100644 (file)
@@ -40,7 +40,7 @@ USA.
        (procedure (block-procedure block)))
     (let ((delete-integrations
           (lambda (get-names set-names!)
-            (with-values
+            (call-with-values
                 (lambda ()
                   (find-integrated-variables (get-names procedure)))
               (lambda (not-integrated integrated)
@@ -60,7 +60,7 @@ USA.
          (begin
            (set! deletions (eq-set-adjoin rest deletions))
            (set-procedure-rest! procedure false))))
-    (with-values
+    (call-with-values
        (lambda ()
          (find-integrated-bindings (procedure-names procedure)
                                    (procedure-values procedure)))
@@ -76,7 +76,7 @@ USA.
 (define (find-integrated-bindings names vals)
   (if (null? names)
       (values '() '() '())
-      (with-values
+      (call-with-values
          (lambda ()
            (find-integrated-bindings (cdr names) (cdr vals)))
        (lambda (names* values* integrated)
@@ -89,7 +89,7 @@ USA.
 (define (find-integrated-variables variables)
   (if (null? variables)
       (values '() '())
-      (with-values
+      (call-with-values
          (lambda ()
            (find-integrated-variables (cdr variables)))
        (lambda (not-integrated integrated)
index 3fed5e02cc693a9da9eedbf32d234c548f2c1053..8e3c7bb4ba2cd2c622fb8f91e9a7ff741fa5d0ca 100644 (file)
@@ -42,7 +42,7 @@ USA.
          (begin
            (edges-disconnect-right! previous-edges)
            (edge-disconnect! next-edge)
-           (with-values
+           (call-with-values
                (lambda ()
                  (order-subproblems/application
                   (parallel-application-node parallel)
@@ -127,7 +127,7 @@ USA.
          (operands
           (list-filter-indices (cdr subproblems) (inliner/operands inliner))))
       (set-inliner/operands! inliner operands)
-      (with-values
+      (call-with-values
          (lambda ()
            (discriminate-items operands subproblem-simple?))
        (lambda (simple complex)
@@ -195,14 +195,14 @@ USA.
 \f
 (define (order-subproblems/out-of-line combination subproblems rest)
   (let ((alist (add-defaulted-subproblems! combination subproblems)))
-    (with-values
+    (call-with-values
        (combination-ordering (combination/context combination)
                              (car subproblems)
                              (cdr subproblems)
                              (combination/model combination))
       (lambda (effect-subproblems push-subproblems)
        (set-combination/frame-size! combination (length push-subproblems))
-       (with-values
+       (call-with-values
            (lambda ()
              (order-subproblems/maybe-overwrite-block
               combination push-subproblems rest alist
@@ -295,7 +295,7 @@ USA.
                (if (and (procedure/open? model)
                         (stack-block/static-link? model-block))
                    (lambda ()
-                     (with-values thunk
+                     (call-with-values thunk
                        (lambda (effect-subproblems push-subproblems)
                          (values
                           effect-subproblems
@@ -306,7 +306,7 @@ USA.
        standard)))
 \f
 (define (optimized-combination-ordering context operator operands callee)
-  (with-values
+  (call-with-values
       (lambda ()
        (sort-subproblems/out-of-line operands callee))
     (lambda (integrated non-integrated)
@@ -362,14 +362,14 @@ USA.
            subproblems))
 \f
 (define (sort-subproblems/out-of-line all-subproblems callee)
-  (with-values
+  (call-with-values
       (lambda ()
        (sort-integrated (cdr (procedure-original-required callee))
                         all-subproblems
                         '()
                         '()))
     (lambda (subproblems integrated non-integrated)
-      (with-values
+      (call-with-values
          (lambda ()
            (sort-integrated (procedure-original-optional callee)
                             subproblems
index a791c67b0c05a2cba6248e9de65f0b7df4b958ca..e81426b39b2b288f77e7f42d5e123c5a9bc22283 100644 (file)
@@ -163,7 +163,7 @@ parameters in registers.
            (or (node/bad-variables node)
                (let ((bad-variables
                       (eq-set-union
-                       (with-values (lambda () (find-node-values node))
+                       (call-with-values (lambda () (find-node-values node))
                          values->variables)
                        (walk-next node walk-node-for-variables))))
                  (set-node/bad-variables! node bad-variables)
@@ -223,7 +223,8 @@ parameters in registers.
                        rvalues))))
 \f
 (define (complex-parallel-constraints subproblems vars-referenced-later)
-  (with-values (lambda () (discriminate-items subproblems subproblem-simple?))
+  (call-with-values
+      (lambda () (discriminate-items subproblems subproblem-simple?))
     (lambda (simple complex)
       (let ((discriminate-by-bad-vars
             (lambda (subproblems)
@@ -233,9 +234,9 @@ parameters in registers.
                          (memq var vars-referenced-later))
                        (subproblem-free-variables subproblem))))))
            (constraint-graph (make-constraint-graph)))
-       (with-values (lambda () (discriminate-by-bad-vars simple))
+       (call-with-values (lambda () (discriminate-by-bad-vars simple))
          (lambda (good-simples bad-simples)
-           (with-values (lambda () (discriminate-by-bad-vars complex))
+           (call-with-values (lambda () (discriminate-by-bad-vars complex))
              (lambda (good-complex bad-complex)
                (add-constraint-set! good-simples
                                     good-complex
index 712e4bbeeb009a5c2dcc199e5e6605e7c12910ef..a99ce8c9c4318316a7af18cb2605dd626ff4e993 100644 (file)
@@ -82,7 +82,7 @@ USA.
                  (eq? (car adjustment) 'KNOWN)
                  (cdr adjustment)))))
       (if overwritten-block
-         (with-values
+         (call-with-values
              (lambda ()
                (subproblems->nodes subproblems
                                    caller-block
@@ -92,7 +92,7 @@ USA.
                  (begin
                    (set-combination/reuse-existing-frame?! combination
                                                            overwritten-block)
-                   (with-values
+                   (call-with-values
                        (lambda ()
                          (order-subproblems/overwrite-block
                           caller-block
@@ -113,7 +113,7 @@ USA.
 (define reuse-size-limit 7)
 \f
 (define (subproblems->nodes subproblems caller-block overwritten-block)
-  (with-values
+  (call-with-values
       (lambda ()
        (let ((n-subproblems (length subproblems)))
          (let ((targets
@@ -136,7 +136,7 @@ USA.
                          (list-tail subproblems n-targets))
                  (values (make-nodes subproblems) '()))))))
     (lambda (nodes extra-subproblems)
-      (with-values
+      (call-with-values
          (lambda ()
            (discriminate-items nodes
              (lambda (node)
index 3f5dc1abfea9714e2b985b6e9e5d56ac68014bf9..7a2d4fedf2c0d5283af9b23a319e6d80a20eab58 100644 (file)
@@ -30,7 +30,7 @@
               (deallocate-registers nodes pushed registers))))))
 
   (define (deallocate-registers nodes pushed registers)
-    (with-values
+    (call-with-values
        (lambda ()
          (discriminate-items registers
            (lambda (register)
index a8be8a328e5d5cc1e2e65851cfec055c63d4e389..97e2943251c7009ab0261ba80cacc0ab709e0ca9 100644 (file)
@@ -333,7 +333,7 @@ USA.
   (compiler-phase
    "Pseudo-Assembly"                   ; garbage collection
    (lambda ()
-     (with-values
+     (call-with-values
         (lambda ()
           (stringify
            (if (not (zero? *recursive-compilation-number*))
index 900b07cb3dd23c7a829f53021e7f11b20a52720c..278fc1bca3ff87e9e7b92975f379ac1fa56f8b7d 100644 (file)
@@ -98,7 +98,7 @@ USA.
              (vector-set! info 2 #t))
          (vector-set! info 0 new)
          info))))
-    
+
 (define (stackify/count/decrement! obj)
   (let ((info (stackify/table/lookup obj)))
     (cond ((not info)
@@ -686,7 +686,7 @@ USA.
                      (fix:+ curr-depth* 1)
                      max-depth*
                      regmap*))))))))
-  
+
 
 (define (build/unique obj prog curr-depth max-depth regmap)
   ;; Returns <program max-depth regmap>
@@ -897,12 +897,13 @@ USA.
                 (fix:max (fix:+ curr-depth 1) max-depth)
                 regmap))
        ((fake-compiled-procedure? obj)
-        (with-values (lambda ()
-                       (build (fake-procedure/block obj)
-                              prog
-                              curr-depth
-                              max-depth
-                              regmap))
+        (call-with-values
+            (lambda ()
+              (build (fake-procedure/block obj)
+                     prog
+                     curr-depth
+                     max-depth
+                     regmap))
           (lambda (prog* max-depth* regmap*)
             (values
              (build/natural stackify-opcode/cc-block-to-entry
@@ -941,7 +942,7 @@ USA.
                   (conc-name stackify-escape/))
   (kind false read-only true)
   (contents false read-only true))
-                  
+
 (define (stackify/make-uuo-arity arity)
   (stackify-escape/make 'arity arity))
 
index c353e93792f7f3d2431981fc272864e44b15ea93..14db2f06bf8e6d8a654f592aec882a74fd98b8a7 100644 (file)
@@ -268,7 +268,7 @@ USA.
       (LAP (LEA ,target (@RO W ,pc-register (- ,label-expr ,pc-label)))))))
 \f
 (define (with-pc recvr)
-  (with-values (lambda () (get-cached-label))
+  (call-with-values (lambda () (get-cached-label))
     (lambda (label reg)
       (if label
          (recvr label reg)
index 00961e3dd7f9cb105ef0b71bf1195c3da93b2225..ef6099f29265b3383a6abebd7c809f9785802cdd 100644 (file)
@@ -105,7 +105,7 @@ USA.
        (let ((end-block?
               (let ((end-block (block-parent block)))
                 (lambda (block) (eq? block end-block)))))
-         (with-values
+         (call-with-values
              (lambda ()
                (find-block/loop
                 link
index 1c93d8aaf46799806e196fda38c96f895ca4109d..86802ad3ea9ca742d3d6faa0e04b23321c6bbbbd 100644 (file)
@@ -207,7 +207,7 @@ USA.
       (values locative (variable-name lvalue)))))
 
 (define (find-block/variable context variable if-known if-ic)
-  (with-values
+  (call-with-values
       (lambda ()
        (find-block context
                    0
@@ -227,7 +227,7 @@ USA.
        block locative))))
 \f
 (define (nearest-ic-block-expression context)
-  (with-values
+  (call-with-values
       (lambda ()
        (find-block context 0 (lambda (block) (not (block-parent block)))))
     (lambda (block locative)
@@ -236,7 +236,7 @@ USA.
       locative)))
 
 (define (closure-ic-locative context block)
-  (with-values
+  (call-with-values
       (lambda ()
        (find-block context 0 (lambda (block*) (eq? block* block))))
     (lambda (block locative)
@@ -246,7 +246,7 @@ USA.
 
 (define (block-ancestor-or-self->locative context block prefix suffix)
   (stack-locative-offset
-   (with-values
+   (call-with-values
        (lambda ()
         (find-block context prefix (lambda (block*) (eq? block* block))))
      (lambda (block* locative)
index 900e635b50a39415b12c400d76c9b7dae21203aa..6cce0e6eec37e7d01320392e4fc63e4d8710a0fb 100644 (file)
@@ -318,7 +318,7 @@ USA.
                                              '() false false)))
                     (make-scfg (cfg-entry-node scfg) '()))
                   (let ((temporary (rtl:make-pseudo-register)))
-                    (with-values
+                    (call-with-values
                         (lambda ()
                           (generate-continuation-entry
                            (combination/context combination)
@@ -1716,7 +1716,7 @@ USA.
               (preamble
                (rtl:make-assignment temporary
                                     (rtl:make-fetch register:value))))
-         (with-values
+         (call-with-values
              (lambda ()
                (generate-continuation-entry (combination/context combination)
                                             preamble))
index 923c3b69fe59b7b800ed5862a3a58c9cc7bb33ec..c174ea9e82abf241a686336d7ba682ab3d449032 100644 (file)
@@ -64,7 +64,7 @@ USA.
                                 nentries
                                 (closure-block-entry-number block)))))
                         (needs-entry?
-                         (with-values
+                         (call-with-values
                              (lambda () (procedure-arity-encoding procedure))
                            (lambda (min max)
                              (rtl:make-procedure-header
@@ -76,7 +76,8 @@ USA.
                          (rtl:make-open-procedure-header
                           (procedure-label procedure))))))
                ((procedure-rest procedure)
-                (with-values (lambda () (procedure-arity-encoding procedure))
+                (call-with-values
+                    (lambda () (procedure-arity-encoding procedure))
                   (lambda (min max)
                     (if (open-procedure-needs-dynamic-link? procedure)
                         (scfg*scfg->scfg!
@@ -188,7 +189,7 @@ USA.
                            (rtl:make-constant
                             (make-unassigned-reference-trap)))))))))
           ((IC)
-           (with-values (lambda () (make-ic-cons value 'USE-ENV)) recvr))
+           (call-with-values (lambda () (make-ic-cons value 'USE-ENV)) recvr))
           ((TRIVIAL-CLOSURE)
            ;; This is not an error.
            ;; It can be the consequence of bad style.
index 5e9b314fdce665d1716908be3243ef1d6415953e..f95983f0d273397c21443fff273c2cd5e3fc5cf6 100644 (file)
@@ -30,7 +30,7 @@ USA.
 (declare (usual-integrations))
 \f
 (define (generate/rvalue operand scfg*cfg->cfg! generator)
-  (with-values (lambda () (generate/rvalue* operand))
+  (call-with-values (lambda () (generate/rvalue* operand))
     (lambda (prefix expression)
       (scfg*cfg->cfg! prefix (generator expression)))))
 
@@ -217,7 +217,7 @@ USA.
                  *ic-procedure-headers*))
       (let ((context (procedure-closure-context procedure)))
        (if (reference? context)
-           (with-values (lambda () (generate/rvalue* context))
+           (call-with-values (lambda () (generate/rvalue* context))
              kernel)
            ;; Is this right if the procedure is being closed
            ;; inside another IC procedure?
@@ -288,7 +288,7 @@ USA.
          ((= (block-entry-number block*) 1)
           ;; Single entry point.  This could use the multiclosure case
           ;; below, but this is simpler.
-          (with-values (lambda () (procedure-arity-encoding procedure))
+          (call-with-values (lambda () (procedure-arity-encoding procedure))
             (lambda (min max)
               (rtl:make-typed-cons:procedure
                (rtl:make-cons-closure
@@ -320,7 +320,7 @@ USA.
                     (cons procedure children)))
                  (entries
                   (map (lambda (proc)
-                         (with-values
+                         (call-with-values
                              (lambda () (procedure-arity-encoding proc))
                            (lambda (min max)
                              (list (procedure-label proc) min max))))
index 7b40656baf84051aa4f4907a9a4e61020a9022be..3250d6cef277828898164626988a652ed780d798 100644 (file)
@@ -105,7 +105,7 @@ USA.
        (rvalue (definition-rvalue definition)))
     (generate/rvalue rvalue scfg*scfg->scfg!
       (lambda (expression)
-       (with-values (lambda () (find-definition-variable context lvalue))
+       (call-with-values (lambda () (find-definition-variable context lvalue))
          (lambda (environment name)
            (load-temporary-register scfg*scfg->scfg! environment
              (lambda (environment)
index 8989a82ed12a00b7d2f935d0604d044f45d90b72..16f628632e5fd64849747eb6b86f06887256d15e 100644 (file)
@@ -86,7 +86,7 @@ USA.
        unspecific)))
 \f
 (define (generate/expression expression)
-  (with-values
+  (call-with-values
       (lambda ()
        (generate/rgraph (expression-entry-node expression) generate/node))
     (lambda (rgraph entry-edge)
@@ -96,7 +96,7 @@ USA.
                     (expression-debugging-info expression)))))
 
 (define (generate/procedure procedure)
-  (with-values
+  (call-with-values
       (lambda ()
        (generate/rgraph
         (procedure-entry-node procedure)
@@ -146,7 +146,7 @@ USA.
 \f
 (define (generate/continuation continuation)
   (let ((label (continuation/label continuation)))
-    (with-values
+    (call-with-values
        (lambda ()
          (generate/rgraph
           (continuation/entry-node continuation)
@@ -214,7 +214,7 @@ USA.
              (special-primitive-handler obj)))))
 
 (define (wrap-with-continuation-entry context prefix scfg-gen)
-  (with-values (lambda () (generate-continuation-entry context prefix))
+  (call-with-values (lambda () (generate-continuation-entry context prefix))
     (lambda (label setup cleanup)
       (scfg-append! setup
                    (scfg-gen label)
index 85b9f6a19f0a9695d62bc922a8d032f0657eecd7..89c80f9404275abaeee9bc59535c6bb8a3e3e8fc 100644 (file)
@@ -70,7 +70,7 @@ USA.
        (let ((expression (rtl:assign-expression rtl)))
          (if (not (rtl:expression-contains? expression
                                             nonfoldable-expression?))
-             (with-values
+             (call-with-values
                  (lambda ()
                    (let ((next (rinst-next rinst)))
                      (if (rinst-dead-register? next register)
@@ -114,7 +114,7 @@ USA.
             (phi-1 next)))
          (recursion
           (lambda (unwrap wrap)
-            (with-values
+            (call-with-values
                 (lambda ()
                   (loop (unwrap expression)))
               (lambda (next expression)
@@ -123,8 +123,7 @@ USA.
                     (values false false)))))))
       (let ((recurse-and-search
             (lambda (unwrap wrap)
-              (with-values (lambda ()
-                             (recursion unwrap wrap))
+              (call-with-values (lambda () (recursion unwrap wrap))
                 (lambda (next expression*)
                   (if next
                       (values next expression*)
@@ -132,7 +131,7 @@ USA.
                                           (lambda (rtl)
                                             rtl ; ignored
                                             false))))))))
-              
+
        (cond ((interpreter-value-register? expression)
               (search-stopping-at expression
                                   (lambda (rtl)
index 0f5559c0bc99d67200562b27b3326082f35d8d7b..dce7b6b8586de2e11f0a6f6022581c5bf5a1330e 100644 (file)
@@ -46,7 +46,7 @@ USA.
            (loop))))))
 
 (define (merge-suffixes! rgraph suffixes)
-  (with-values
+  (call-with-values
       (lambda ()
        (discriminate-items suffixes
          (lambda (suffix)
@@ -169,7 +169,7 @@ USA.
   (let loop ((bblocks bblocks))
     (if (null? bblocks)
        '()
-       (with-values (lambda () (matching-suffixes bblock (car bblocks)))
+       (call-with-values (lambda () (matching-suffixes bblock (car bblocks)))
          (lambda (sx sy adjustments)
            (if (or (interesting-suffix? bblock sx)
                    (interesting-suffix? (car bblocks) sy))
@@ -215,7 +215,7 @@ USA.
        (adjustments '()))
     (if (or (null? rx) (null? ry))
        (values wx wy adjustments)
-       (with-values
+       (call-with-values
            (lambda ()
              (match-rtl (rinst-rtl (car rx)) (rinst-rtl (car ry)) e))
          (lambda (e adjustment)
index 90e091903cba1a1f0cc3df6e722c6ea8b97544b5..fe5eb4649d7c61adeded4373b07c2785b1d165ed 100644 (file)
@@ -990,7 +990,7 @@ Prefix argument means do not kill the debugger buffer."
   string?)
 
 (define (print-subproblem number frame port)
-  (with-values (lambda () (stack-frame/debugging-info frame))
+  (call-with-values (lambda () (stack-frame/debugging-info frame))
     (lambda (expression environment subexpression)
       (print-history-level
        (stack-frame/compiled-code? frame)
index 429ea1a0e8a5fbd43cc18e93c357b97fd6fd2d44..abcda0ecf2ee1d907376fa66f7bc22edf524106c 100644 (file)
@@ -57,13 +57,13 @@ USA.
               (%window-line-end-index? window index))))
 
 (define (buffer-window/index->y window index)
-  (with-values (lambda () (start-point-for-index window index))
+  (call-with-values (lambda () (start-point-for-index window index))
     (lambda (start-index start-y line-start-index)
       line-start-index
       (predict-y window start-index start-y index))))
 
 (define (buffer-window/index->coordinates window index)
-  (with-values (lambda () (start-point-for-index window index))
+  (call-with-values (lambda () (start-point-for-index window index))
     (lambda (start-index start-y line-start-index)
       (let ((group (%window-group window))
            (char-image-strings (%window-char-image-strings window))
@@ -88,7 +88,7 @@ USA.
         (make-mark (%window-group window) index))))
 
 (define (buffer-window/coordinates->index window x y)
-  (with-values (lambda () (start-point-for-y window y))
+  (call-with-values (lambda () (start-point-for-y window y))
     (lambda (start-index start-y)
       (predict-index window start-index start-y x y))))
 
@@ -97,7 +97,7 @@ USA.
   (let ((index (mark-index mark)))
     (and (fix:<= (%window-group-start-index window) index)
         (fix:<= index (%window-group-end-index window))
-        (with-values (lambda () (start-point-for-index window index))
+        (call-with-values (lambda () (start-point-for-index window index))
           (lambda (start-index start-y line-start-index)
             line-start-index
             (predict-index-visible? window start-index start-y index))))))
index 320e7467e5924083d91fbd815c995dc787294a7b..c11f03cf4cd4ea3bbab4b494c2195364cef4d72c 100644 (file)
@@ -385,7 +385,7 @@ USA.
             (set-car! history (cons (command-name command) arguments))
             (set! command-history (cdr history))))))
     (cond ((string? specification)
-          (with-values
+          (call-with-values
               (lambda ()
                 (let ((end (string-length specification)))
                   (let loop
@@ -403,7 +403,7 @@ USA.
                                                          index
                                                          end
                                                          #\newline)))
-                          (with-values
+                          (call-with-values
                               (lambda ()
                                 (interactive-argument
                                  (string-ref specification index)
@@ -411,7 +411,7 @@ USA.
                                             (+ index 1)
                                             (or newline end))))
                             (lambda (argument expression from-tty?)
-                              (with-values
+                              (call-with-values
                                   (lambda ()
                                     (if newline
                                         (loop (+ newline 1))
index 38130754bbee044d492ffdff96ff62697b025f26..b578130453cba54aeb9a32b20fa92030f0ea594c 100644 (file)
@@ -98,7 +98,7 @@ with the next possible expansion not yet tried."
                          (current-point))))
            (if (zero? n)
                (values (mark-permanent-copy start) expansion)
-               (with-values
+               (call-with-values
                    (lambda ()
                      (dabbrevs-search start pattern direction do-case))
                  (lambda (loc expansion)
@@ -159,8 +159,8 @@ with the next possible expansion not yet tried."
          (if (or expansion (> which 0))
              (step3 loc expansion)
              ;; Look forward
-             (with-values (lambda ()
-                            (search&setup-table (max 1 (- which)) false))
+             (call-with-values
+                 (lambda () (search&setup-table (max 1 (- which)) false))
                (lambda (loc expansion)
                  (set-variable! last-dabbrevs-direction -1)
                  (step3 loc expansion)))))
@@ -168,8 +168,8 @@ with the next possible expansion not yet tried."
        ;; Try looking backward unless inhibited.
        (if (< which 0)
            (step2 loc false)
-           (with-values (lambda ()
-                          (search&setup-table (max 1 which) true))
+           (call-with-values
+               (lambda () (search&setup-table (max 1 which) true))
              (lambda (loc expansion)
                (if (not expansion)
                    (set-variable! last-dabbrevs-expansion-location
index eb078787d0b80d0b2406dffc33a556e52ce65614..79436cdce832c7fdd409f4b6fc285830523dd020 100644 (file)
@@ -164,7 +164,7 @@ USA.
     (window-cursor-enable! cursor-window)))
 
 (define-method editor-frame (:button-event! editor-frame button x y)
-  (with-values
+  (call-with-values
       (lambda ()
        (inferior-containing-coordinates editor-frame x y buffer-frame?))
     (lambda (frame relative-x relative-y)
index ae279ccba4823e45e26b72f9911d1bd553ffe22f..13bde60890d83992ec59d1eb12768b046184af96 100644 (file)
@@ -50,7 +50,7 @@ USA.
     (let ((bufferset (make-bufferset initial-buffer))
          (screen (display-type/make-screen display-type make-screen-args)))
       (initialize-screen-root-window! screen bufferset initial-buffer)
-      (with-values
+      (call-with-values
          (lambda () (display-type/get-input-operations display-type screen))
        (lambda (halt-update? peek-no-hang peek read)
          (%make-editor name
index 902b9e7cd8ec072c84ffb09d5ebfc8530b532057..bda7d6715a85a6f07202c8f6569947a9adba0053 100644 (file)
@@ -824,7 +824,7 @@ and reverse search is specified by a negative numeric arg."
                          regexp
                          "...")))
       (message msg)
-      (with-values
+      (call-with-values
          (lambda ()
            (without-clipping buffer
              (lambda ()
@@ -1044,7 +1044,7 @@ original message into it."
       (make-mail-buffer
        (without-clipping buffer
         (lambda ()
-          (with-values (lambda () (original-header-limits memo))
+          (call-with-values (lambda () (original-header-limits memo))
             (lambda (start end)
               `(("To" "")
                 ("Subject"
@@ -1603,7 +1603,7 @@ Leaves original message, deleted, before the undigestified messages."
 
 (define (memoize-messages buffer start end)
   (let ((memo (buffer-msg-memo buffer)))
-    (with-values
+    (call-with-values
        (lambda ()
          (memoize-messages* start
                             end
@@ -1620,7 +1620,7 @@ Leaves original message, deleted, before the undigestified messages."
   (let ((next (msg-memo/next memo)))
     (if (not next)
        (memoize-messages buffer start end)
-       (with-values (lambda () (memoize-messages* start end memo))
+       (call-with-values (lambda () (memoize-messages* start end memo))
          (lambda (start tail)
            (mark-temporary! start)
            (set-msg-memo/next! tail next)
index a4601044a7e0c86b7709a532eabd3b5949fdcbd8..872983b81e8f7fba72241cc06372cd96b0677360 100644 (file)
@@ -195,7 +195,7 @@ USA.
                      buffer
                      (ref-variable-object tab-width))))
              tab-width)))
-    (with-values
+    (call-with-values
        (lambda ()
          (compute-horizontal-space target-column
                                    (mark-column point)
index 5b81cc1810134d2ba77104591c66c808c97a43dc..50abbd3fd50c9ea66d169daa0b6bfd011e746eba 100644 (file)
@@ -45,7 +45,7 @@ USA.
     (let ((baud-rate (output-port/baud-rate (console-i/o-port)))
          (x-size (output-port/x-size (console-i/o-port)))
          (y-size (output-port/y-size (console-i/o-port))))
-      (make-screen (with-values
+      (make-screen (call-with-values
                       (lambda ()
                         (compute-scrolling-costs description
                                                  baud-rate
@@ -1113,7 +1113,7 @@ USA.
       (output-n screen command n-lines)))
 \f
 (define (compute-scrolling-costs description baud-rate x-size y-size)
-  (with-values
+  (call-with-values
       (lambda ()
        (i/d-line-cost-vectors description
                               baud-rate
@@ -1122,7 +1122,7 @@ USA.
                               (or (ts-insert-line description)
                                   (ts-reverse-scroll description))))
     (lambda (insert-line-cost insert-line-next-cost)
-      (with-values
+      (call-with-values
          (lambda ()
            (i/d-line-cost-vectors description
                                   baud-rate
index 083c587617bfdd39b9ac97897f78e3b5b3ec9ffd..18840212924466cea262b8f7d11ceff5ecb49e5c 100644 (file)
@@ -550,7 +550,7 @@ USA.
                     #f))
 
 (define (stack-frame->control-point stack-frame)
-  (with-values (lambda () (print-stack-frame stack-frame))
+  (call-with-values (lambda () (print-stack-frame stack-frame))
     (lambda (element-stream next-control-point)
       (make-control-point
        (stack-frame/interrupt-mask stack-frame)
@@ -575,7 +575,7 @@ USA.
   (if (eq? (stack-frame/return-address stack-frame)
           return-address/join-stacklets)
       (values (stream) (vector-ref (stack-frame/elements stack-frame) 1))
-      (with-values
+      (call-with-values
          (lambda ()
            (let ((next (stack-frame/%next stack-frame)))
              (cond ((stack-frame? next)
index 765c8b55868b0726cd10e172902a9f2bba4e9a76..8e3b773ce7579f61105b29abd1e756b800baa1e6 100644 (file)
@@ -439,7 +439,7 @@ USA.
        (let loop ((frame top-subproblem) (level 0))
          (if frame
              (begin
-               (with-values (lambda () (stack-frame/debugging-info frame))
+               (call-with-values (lambda () (stack-frame/debugging-info frame))
                  (lambda (expression environment subexpression)
                    subexpression
                    (terse-print-expression level
@@ -868,7 +868,7 @@ USA.
   (set-dstate/number-of-reductions!
    dstate
    (improper-list-length (stack-frame/reductions stack-frame)))
-  (with-values (lambda () (stack-frame/debugging-info stack-frame))
+  (call-with-values (lambda () (stack-frame/debugging-info stack-frame))
     (lambda (expression environment subexpression)
       (set-dstate/expression! dstate expression)
       (set-dstate/subexpression! dstate subexpression)
index 5969c36d1c3275d9f6080250bd21213d3f8ba1f3..75b3a282d919c0c4bd616295bd51f0c52755c518 100644 (file)
@@ -562,7 +562,7 @@ USA.
                      (dbg-block/length block))))
               (let ((stack-link (dbg-block/stack-link block)))
                 (cond ((not stack-link)
-                       (with-values
+                       (call-with-values
                            (lambda ()
                              (stack-frame/resolve-stack-address
                               frame
index ff1aa64d50308bc5a1dc75ea2a2fa2ee8efea5f2..f3b08a2ff39430ce43a946afe815d8c76c73b94d 100644 (file)
@@ -423,9 +423,9 @@ USA.
                   #f #f #f))
 
 (define (start-pipe-subprocess filename arguments environment)
-  (with-values make-pipe
+  (call-with-values make-pipe
     (lambda (child-read parent-write)
-      (with-values make-pipe
+      (call-with-values make-pipe
        (lambda (parent-read child-write)
          (let ((process
                 (make-subprocess filename arguments environment
@@ -436,7 +436,7 @@ USA.
            process))))))
 
 (define (start-pty-subprocess filename arguments environment)
-  (with-values open-pty-master
+  (call-with-values open-pty-master
     (lambda (master-channel master-name slave-name)
       master-name
       (make-subprocess filename arguments environment
index 241936ce28f4001267f0c6826eda6392080b6148..d02ed0e4a8c4772f7e29e76766e3c005cefadbcd 100644 (file)
@@ -40,7 +40,7 @@ USA.
        ((scode-constant? expression)
         expression)
        (else
-        (with-values (lambda () (split-environment environment))
+        (call-with-values (lambda () (split-environment environment))
           (lambda (bound-names interpreter-environment)
             (hook/extended-scode-eval
              (cond ((null? bound-names)