Change scode libraries to carry both imports and imports-used.
authorChris Hanson <org/chris-hanson/cph>
Wed, 24 Oct 2018 04:26:45 +0000 (21:26 -0700)
committerChris Hanson <org/chris-hanson/cph>
Wed, 24 Oct 2018 04:26:45 +0000 (21:26 -0700)
src/runtime/library-scode.scm
src/runtime/runtime.pkg
src/sf/sf.pkg
src/sf/toplev.scm

index 3902fcdc39d4535630793b4b0b6b041c892d44fa..f80cab872ad94fde1aec89d9acfdf449ad8cf5f5 100644 (file)
@@ -65,6 +65,9 @@ USA.
 (define (scode-library-imports library)
   (map list->library-import (scode-library-property 'imports library)))
 
+(define (scode-library-imports-used library)
+  (map list->library-import (scode-library-property 'imports-used library)))
+
 (define (scode-library-exports library)
   (map list->library-export (scode-library-property 'exports library)))
 
@@ -99,7 +102,8 @@ USA.
   (make-scode-library
    `(scode-library
      (name ,(library-name library))
-     (imports ,@(map library-import->list (library-imports-used library)))
+     (imports ,@(map library-import->list (library-imports library)))
+     (imports-used ,@(map library-import->list (library-imports-used library)))
      (exports ,@(map library-export->list (library-exports library))))
    (library-contents library)))
 
@@ -107,6 +111,7 @@ USA.
   (guarantee scode-library? library 'scode-library->library)
   (make-library (scode-library-name library)
                'imports (scode-library-imports library)
+               'imports-used (scode-library-imports-used library)
                'exports (scode-library-exports library)
                'contents (scode-library-contents library)
                'filename filename))
index 4edba5cb7544934958567bbb37bd2b547405c476..d6aeab13cdf965cf8293224ce94fef1236ce3cc6 100644 (file)
@@ -5943,6 +5943,7 @@ USA.
          map-scode-library
          r7rs-scode-file?
          scode-library-imports
+         scode-library-imports-used
          scode-library-name
          scode-library?)
   (export (runtime library)
index 304b20beff8af95b7974764a58582829bce0466d..a838fd116c16b08dba791ffe5f64739140e8a35a 100644 (file)
@@ -47,7 +47,7 @@ USA.
          r7rs-scode-file?
          r7rs-source?
          read-r7rs-source
-         scode-library-imports
+         scode-library-imports-used
          standard-library-globals
          syntax-r7rs-source)
   (import (runtime microcode-tables)
index e01d93584bcbe2d87cbc42f2eb1cc1c75eff90a4..85300ea570c541bf1af54d6b4843d927d0887b9d 100644 (file)
@@ -300,7 +300,7 @@ USA.
          '()))
 
 (define (integrate/r7rs-library library)
-  (let ((imports (scode-library-imports library)))
+  (let ((imports (scode-library-imports-used library)))
     (map-scode-library (lambda (contents)
                         (receive (optimized externs-block externs)
                             (integrate/kernel-1