Eliminate use of MAPCAN.
authorChris Hanson <org/chris-hanson/cph>
Wed, 30 Oct 1991 21:01:22 +0000 (21:01 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 30 Oct 1991 21:01:22 +0000 (21:01 +0000)
13 files changed:
v7/src/compiler/back/syerly.scm
v7/src/compiler/base/constr.scm
v7/src/compiler/fgopt/param.scm
v7/src/compiler/machines/bobcat/decls.scm
v7/src/compiler/machines/bobcat/inerly.scm
v7/src/compiler/machines/mips/decls.scm
v7/src/compiler/machines/spectrum/decls.scm
v7/src/compiler/machines/vax/decls.scm
v7/src/compiler/machines/vax/inerly.scm
v7/src/cref/anfile.scm
v7/src/cref/object.scm
v7/src/runtime/defstr.scm
v7/src/sf/pardec.scm

index 3e445ea69faffcea8da168c581c25190763dfe5c..8a71a634c5d39ab2612931808d072593a20f8a73 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/syerly.scm,v 1.7 1988/08/31 06:40:22 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/back/syerly.scm,v 1.8 1991/10/30 20:48:53 cph Exp $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -94,11 +94,11 @@ MIT in each case. |#
                ((CONS*)
                 (apply cons* (map scode/unquasiquote operands)))
                ((APPEND)
-                (mapcan (lambda (component)
-                          (if (scode/constant? component)
-                              (scode/constant-value component)
-                              (list (list 'UNQUOTE-SPLICING component))))
-                        operands))
+                (append-map (lambda (component)
+                              (if (scode/constant? component)
+                                  (scode/constant-value component)
+                                  (list (list 'UNQUOTE-SPLICING component))))
+                            operands))
                (else (list 'UNQUOTE exp))))
            (cond ((eq? operator cons)
                   ;; integrations
index 348285321a094bc8c3cbd47d5d7288f54decf61e..1c7ce9b039bf4080e033e25cc7d9dca4b0f2df5e 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/constr.scm,v 1.1 1989/04/26 05:11:06 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/base/constr.scm,v 1.2 1991/10/30 20:49:47 cph Exp $
 
-Copyright (c) 1989 Massachusetts Institute of Technology
+Copyright (c) 1989-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -158,11 +158,8 @@ MIT in each case. |#
          elements
          (begin
            (mark! node)
-           (update! node (safe-mapcan transitively-close*! elements))
+           (update! node (append-map transitively-close*! elements))
            (select node))))))
-
-(define-integrable (safe-mapcan procedure list)
-  (mapcan (lambda (item) (list-copy (procedure item))) list))
 \f
 (define (order-per-constraints elements constraint-graph)
   (order-per-constraints/extracted
@@ -250,7 +247,7 @@ MIT in each case. |#
 
   (with-new-node-marks
    (lambda ()
-     (mapcan doit entry-nodes))))
+     (append-map! doit entry-nodes))))
 
 (define *constraint-generation*)
 
index 35385cf5b248039732969418b57c535ad8de6052..c07455db293b8e95ca8c4d960ea897645329f275 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/fgopt/param.scm,v 1.2 1989/10/26 07:36:59 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/fgopt/param.scm,v 1.3 1991/10/30 20:50:56 cph Exp $
 
-Copyright (c) 1988, 1989 Massachusetts Institute of Technology
+Copyright (c) 1988-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -279,7 +279,7 @@ parameters in registers.
         (append (block-children block) (block-disowned-children block))))
     (if (null? children)
        (list block)
-       (cons block (mapcan linearize-block-tree children)))))
+       (cons block (append-map! linearize-block-tree children)))))
 
 (define (interesting-variable? variable)
   ;;; variables that will be in cells are eliminated from
index 0f79769b9fc7d936f11c5818f0ccc0947f046d42..4dc88173fdfadfefdf0d952b50ae689afcf7d3c9 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/decls.scm,v 4.28 1991/07/25 02:34:19 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/decls.scm,v 4.29 1991/10/30 20:52:36 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -53,17 +53,18 @@ MIT in each case. |#
 
 (define (setup-source-nodes!)
   (let ((filenames
-        (mapcan (lambda (subdirectory)
-                  (map (lambda (pathname)
-                         (string-append subdirectory
-                                        "/"
-                                        (pathname-name pathname)))
-                       (directory-read
-                        (string-append subdirectory
-                                       "/"
-                                       source-file-expression))))
-                '("back" "base" "fggen" "fgopt" "rtlbase" "rtlgen" "rtlopt"
-                         "machines/bobcat"))))
+        (append-map!
+         (lambda (subdirectory)
+           (map (lambda (pathname)
+                  (string-append subdirectory
+                                 "/"
+                                 (pathname-name pathname)))
+                (directory-read
+                 (string-append subdirectory
+                                "/"
+                                source-file-expression))))
+         '("back" "base" "fggen" "fgopt" "rtlbase" "rtlgen" "rtlopt"
+                  "machines/bobcat"))))
     (if (null? filenames)
        (error "Can't find source files of compiler"))
     (set! source-filenames filenames))
index b81102b5bbc19dc4f0982cbe796261839ad4e3b6..37723aaf683112ed58e3b28fbb994f88da9e27b7 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/inerly.scm,v 1.6 1988/08/31 06:00:59 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/bobcat/inerly.scm,v 1.7 1991/10/30 20:53:14 cph Exp $
 
-Copyright (c) 1988 Massachusetts Institute of Technology
+Copyright (c) 1988-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -49,17 +49,17 @@ MIT in each case. |#
 
 (define (make-ea-transformer #!optional modes keywords)
   (make-database-transformer
-    (mapcan (lambda (rule)
-             (apply
-              (lambda (pattern variables categories expression)
-                (if (and (or (default-object? modes)
-                             (eq-subset? modes categories))
-                         (or (default-object? keywords)
-                             (not (memq (car pattern) keywords))))
-                    (list (early-make-rule pattern variables expression))
-                    '()))
-              rule))
-           early-ea-database)))
+    (append-map! (lambda (rule)
+                  (apply
+                   (lambda (pattern variables categories expression)
+                     (if (and (or (default-object? modes)
+                                  (eq-subset? modes categories))
+                              (or (default-object? keywords)
+                                  (not (memq (car pattern) keywords))))
+                         (list (early-make-rule pattern variables expression))
+                         '()))
+                   rule))
+                early-ea-database)))
 
 (define (eq-subset? s1 s2)
   (or (null? s1)
index f551e60c99cb1ebd0d00529a9cbec6fd7bfbf0d9..94cbb227fc110531f89f0e3c800351e43ba875bb 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/mips/decls.scm,v 1.3 1991/07/25 02:40:21 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/mips/decls.scm,v 1.4 1991/10/30 20:56:59 cph Exp $
 $MC68020-Header: decls.scm,v 4.27 90/05/03 15:17:08 GMT jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
@@ -54,17 +54,18 @@ MIT in each case. |#
 
 (define (setup-source-nodes!)
   (let ((filenames
-        (mapcan (lambda (subdirectory)
-                  (map (lambda (pathname)
-                         (string-append subdirectory
-                                        "/"
-                                        (pathname-name pathname)))
-                       (directory-read
-                        (string-append subdirectory
-                                       "/"
-                                       source-file-expression))))
-                '("back" "base" "fggen" "fgopt" "rtlbase" "rtlgen" "rtlopt"
-                         "machines/mips"))))
+        (append-map!
+         (lambda (subdirectory)
+           (map (lambda (pathname)
+                  (string-append subdirectory
+                                 "/"
+                                 (pathname-name pathname)))
+                (directory-read
+                 (string-append subdirectory
+                                "/"
+                                source-file-expression))))
+         '("back" "base" "fggen" "fgopt" "rtlbase" "rtlgen" "rtlopt"
+                  "machines/mips"))))
     (if (null? filenames)
        (error "Can't find source files of compiler"))
     (set! source-filenames filenames))
index b2f12d231520c980250ce1cdd406287cffcf0995..45d32f5141f08aa8fbced97cb4bad317882f4eaf 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/decls.scm,v 4.28 1991/07/25 02:35:19 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/spectrum/decls.scm,v 4.29 1991/10/30 20:51:43 cph Exp $
 $MC68020-Header: decls.scm,v 4.27 90/05/03 15:17:08 GMT jinx Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
@@ -53,17 +53,18 @@ MIT in each case. |#
 
 (define (setup-source-nodes!)
   (let ((filenames
-        (mapcan (lambda (subdirectory)
-                  (map (lambda (pathname)
-                         (string-append subdirectory
-                                        "/"
-                                        (pathname-name pathname)))
-                       (directory-read
-                        (string-append subdirectory
-                                       "/"
-                                       source-file-expression))))
-                '("back" "base" "fggen" "fgopt" "rtlbase" "rtlgen" "rtlopt"
-                         "machines/spectrum"))))
+        (append-map!
+         (lambda (subdirectory)
+           (map (lambda (pathname)
+                  (string-append subdirectory
+                                 "/"
+                                 (pathname-name pathname)))
+                (directory-read
+                 (string-append subdirectory
+                                "/"
+                                source-file-expression))))
+         '("back" "base" "fggen" "fgopt" "rtlbase" "rtlgen" "rtlopt"
+                  "machines/spectrum"))))
     (if (null? filenames)
        (error "Can't find source files of compiler"))
     (set! source-filenames filenames))
index e23717bec4cdebeaf0dedbaffe2718a830503f92..29e5db4fa2771cbd8d83d742494d3af9fb2c03c7 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/vax/decls.scm,v 4.6 1991/07/25 02:38:48 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/vax/decls.scm,v 4.7 1991/10/30 20:54:22 cph Exp $
 $MC68020-Header: decls.scm,v 4.27 90/05/03 15:17:08 GMT jinx Exp $
 
 Copyright (c) 1987-91 Massachusetts Institute of Technology
@@ -54,17 +54,18 @@ MIT in each case. |#
 
 (define (setup-source-nodes!)
   (let ((filenames
-        (mapcan (lambda (subdirectory)
-                  (map (lambda (pathname)
-                         (string-append subdirectory
-                                        "/"
-                                        (pathname-name pathname)))
-                       (directory-read
-                        (string-append subdirectory
-                                       "/"
-                                       source-file-expression))))
-                '("back" "base" "fggen" "fgopt" "rtlbase" "rtlgen" "rtlopt"
-                         "machines/vax"))))
+        (append-map!
+         (lambda (subdirectory)
+           (map (lambda (pathname)
+                  (string-append subdirectory
+                                 "/"
+                                 (pathname-name pathname)))
+                (directory-read
+                 (string-append subdirectory
+                                "/"
+                                source-file-expression))))
+         '("back" "base" "fggen" "fgopt" "rtlbase" "rtlgen" "rtlopt"
+                  "machines/vax"))))
     (if (null? filenames)
        (error "Can't find source files of compiler"))
     (set! source-filenames filenames))
index 33d5584573a9795ed2a0fd72b49d0f15d452f4c0..02ea580bab282158ebb70f29255e4dc5be0819f7 100644 (file)
@@ -1,9 +1,9 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/vax/inerly.scm,v 1.5 1989/05/17 20:29:02 jinx Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/compiler/machines/vax/inerly.scm,v 1.6 1991/10/30 20:53:57 cph Exp $
 $MC68020-Header: inerly.scm,v 1.6 88/08/31 06:00:59 GMT cph Exp $
 
-Copyright (c) 1987, 1989 Massachusetts Institute of Technology
+Copyright (c) 1987-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -88,14 +88,14 @@ MIT in each case. |#
 (define (make-ea-transformer category type)
   type                                 ; ignored
   (make-database-transformer
-   (mapcan (lambda (rule)
-            (apply
-             (lambda (pattern variables categories expression)
-               (if (memq category categories)
-                   (list (early-make-rule pattern variables expression))
-                   '()))
-             rule))
-          early-ea-database)))
+   (append-map! (lambda (rule)
+                 (apply
+                  (lambda (pattern variables categories expression)
+                    (if (memq category categories)
+                        (list (early-make-rule pattern variables expression))
+                        '()))
+                  rule))
+               early-ea-database)))
 \f
 ;;;; Early effective address assembly.
 
index ae5dc5c4b69582b90d3893c09c084308120351d7..d4047817812a89b0e935616afdcc36ad55cbe0c3 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/cref/anfile.scm,v 1.4 1990/10/05 11:36:32 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/cref/anfile.scm,v 1.5 1991/10/30 20:59:06 cph Exp $
 
-Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology
+Copyright (c) 1988-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -67,7 +67,7 @@ MIT in each case. |#
   (cond ((comment? expression)
         (process-top-level (comment-expression expression)))
        ((sequence? expression)
-        (mapcan process-top-level (sequence-actions expression)))
+        (append-map! process-top-level (sequence-actions expression)))
        (else
         (list expression))))
 
index 7736cf324555ece2e45131dfde3ff734ead94b1f..f4c91e6234e7943282483d5ca5df41798da247ec 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/cref/object.scm,v 1.3 1990/10/04 10:21:24 cph Rel $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/cref/object.scm,v 1.4 1991/10/30 20:58:35 cph Exp $
 
-Copyright (c) 1988, 1990 Massachusetts Institute of Technology
+Copyright (c) 1988-91 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -73,10 +73,9 @@ MIT in each case. |#
 
 (define (make-package name file-cases initialization parent)
   (let ((files
-        (mapcan (lambda (file-case)
-                  (mapcan (lambda (clause) (list-copy (cdr clause)))
-                          (cdr file-case)))
-                file-cases)))
+        (append-map! (lambda (file-case)
+                       (append-map cdr (cdr file-case)))
+                     file-cases)))
     (%make-package name
                   file-cases
                   files
index e3b4e3662cf8d785749ac1435305fc03e39527df..3759bd5ae5a8ed4356a5b6b83f3593e2ae4e158e 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/defstr.scm,v 14.17 1991/04/08 22:26:18 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/defstr.scm,v 14.18 1991/10/30 21:00:11 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -482,68 +482,69 @@ must be defined when the defstruct is evaluated.
   `(ACCESS ,name #F))
 
 (define (accessor-definitions structure)
-  (mapcan (lambda (slot)
-           (let ((accessor-name
-                  (if (structure/conc-name structure)
-                      (symbol-append (structure/conc-name structure)
-                                     (slot/name slot))
-                      (slot/name slot))))
-             (if (eq? (structure/scheme-type structure) 'RECORD)
-                 `((DECLARE (INTEGRATE-OPERATOR ,accessor-name))
-                   (DEFINE ,accessor-name
-                     (,(absolute 'RECORD-ACCESSOR)
-                      ,(structure/type structure)
-                      ',(slot/name slot))))
-                 `((DECLARE (INTEGRATE-OPERATOR ,accessor-name))
-                   (DEFINE (,accessor-name STRUCTURE)
-                     (DECLARE (INTEGRATE STRUCTURE))
-                     ,(case (structure/scheme-type structure)
-                        ((VECTOR)
-                         `(,(absolute 'VECTOR-REF)
-                           STRUCTURE
-                           ,(slot/index slot)))
-                        ((LIST)
-                         `(,(absolute 'LIST-REF)
-                           STRUCTURE
-                           ,(slot/index slot)))
-                        (error "Unknown scheme type" structure)))))))
-         (structure/slots structure)))
+  (append-map! (lambda (slot)
+                (let ((accessor-name
+                       (if (structure/conc-name structure)
+                           (symbol-append (structure/conc-name structure)
+                                          (slot/name slot))
+                           (slot/name slot))))
+                  (if (eq? (structure/scheme-type structure) 'RECORD)
+                      `((DECLARE (INTEGRATE-OPERATOR ,accessor-name))
+                        (DEFINE ,accessor-name
+                          (,(absolute 'RECORD-ACCESSOR)
+                           ,(structure/type structure)
+                           ',(slot/name slot))))
+                      `((DECLARE (INTEGRATE-OPERATOR ,accessor-name))
+                        (DEFINE (,accessor-name STRUCTURE)
+                          (DECLARE (INTEGRATE STRUCTURE))
+                          ,(case (structure/scheme-type structure)
+                             ((VECTOR)
+                              `(,(absolute 'VECTOR-REF)
+                                STRUCTURE
+                                ,(slot/index slot)))
+                             ((LIST)
+                              `(,(absolute 'LIST-REF)
+                                STRUCTURE
+                                ,(slot/index slot)))
+                             (error "Unknown scheme type" structure)))))))
+              (structure/slots structure)))
 \f
 (define (settor-definitions structure)
-  (mapcan (lambda (slot)
-           (if (slot/read-only? slot)
-               '()
-               (let ((settor-name
-                      (if (structure/conc-name structure)
-                          (symbol-append 'SET-
-                                         (structure/conc-name structure)
-                                         (slot/name slot)
-                                         '!)
-                          (symbol-append 'SET-
-                                         (slot/name slot)
-                                         '!))))
-                 (if (eq? (structure/scheme-type structure) 'RECORD)
-                     `((DECLARE (INTEGRATE-OPERATOR ,settor-name))
-                       (DEFINE ,settor-name
-                         (,(absolute 'RECORD-UPDATER)
-                          ,(structure/type structure)
-                          ',(slot/name slot))))
-                     `((DECLARE (INTEGRATE-OPERATOR ,settor-name))
-                       (DEFINE (,settor-name STRUCTURE VALUE)
-                         (DECLARE (INTEGRATE STRUCTURE VALUE))
-                         ,(case (structure/scheme-type structure)
-                            ((VECTOR)
-                             `(,(absolute 'VECTOR-SET!) STRUCTURE
-                                                        ,(slot/index slot)
-                                                        VALUE))
-                            ((LIST)
-                             `(,(absolute 'SET-CAR!)
-                               (,(absolute 'LIST-TAIL) STRUCTURE
-                                                       ,(slot/index slot))
-                               VALUE))
-                            (else
-                             (error "Unknown scheme type" structure)))))))))
-         (structure/slots structure)))
+  (append-map!
+   (lambda (slot)
+     (if (slot/read-only? slot)
+        '()
+        (let ((settor-name
+               (if (structure/conc-name structure)
+                   (symbol-append 'SET-
+                                  (structure/conc-name structure)
+                                  (slot/name slot)
+                                  '!)
+                   (symbol-append 'SET-
+                                  (slot/name slot)
+                                  '!))))
+          (if (eq? (structure/scheme-type structure) 'RECORD)
+              `((DECLARE (INTEGRATE-OPERATOR ,settor-name))
+                (DEFINE ,settor-name
+                  (,(absolute 'RECORD-UPDATER)
+                   ,(structure/type structure)
+                   ',(slot/name slot))))
+              `((DECLARE (INTEGRATE-OPERATOR ,settor-name))
+                (DEFINE (,settor-name STRUCTURE VALUE)
+                  (DECLARE (INTEGRATE STRUCTURE VALUE))
+                  ,(case (structure/scheme-type structure)
+                     ((VECTOR)
+                      `(,(absolute 'VECTOR-SET!) STRUCTURE
+                                                 ,(slot/index slot)
+                                                 VALUE))
+                     ((LIST)
+                      `(,(absolute 'SET-CAR!)
+                        (,(absolute 'LIST-TAIL) STRUCTURE
+                                                ,(slot/index slot))
+                        VALUE))
+                     (else
+                      (error "Unknown scheme type" structure)))))))))
+   (structure/slots structure)))
 \f
 (define (constructor-definitions structure)
   `(,@(map (lambda (boa-constructor)
index 1eae82140bd8c8c54c4e334788129047884978ea..1fa15dd6128a9c5024e07b478b1e44fc57561892 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/sf/pardec.scm,v 4.4 1991/10/01 21:38:26 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/sf/pardec.scm,v 4.5 1991/10/30 21:01:22 cph Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -163,12 +163,12 @@ MIT in each case. |#
                     (map procedure (declarations/after declarations))))
 
 (define (declarations/integrated-variables declarations)
-  (mapcan (lambda (binding)
-           (if (and (eq? 'INTEGRATE (binding/operation binding))
-                    (eq? 'NO-VALUES (binding/values binding)))
-               (list-copy (binding/names binding))
-               '()))
-         (declarations/after declarations)))
+  (append-map (lambda (binding)
+               (if (and (eq? 'INTEGRATE (binding/operation binding))
+                        (eq? 'NO-VALUES (binding/values binding)))
+                   (binding/names binding)
+                   '()))
+             (declarations/after declarations)))
 
 (define-structure (declarations
                   (type vector)
@@ -303,8 +303,8 @@ symbol                              ; obvious.
                     (intern-type (vector-ref extern 2)
                                  (vector-ref extern 3)))))
      table
-     (mapcan read-externs-file
-            (mapcan specification->pathnames specifications)))))
+     (append-map! read-externs-file
+                 (append-map! specification->pathnames specifications)))))
 
 (define (specification->pathnames specification)
   (let ((value