From: Chris Hanson Date: Wed, 24 Oct 2018 04:26:45 +0000 (-0700) Subject: Change scode libraries to carry both imports and imports-used. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~181 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=0ad3e3626c8457563627f93b5daa01d950e68176;p=mit-scheme.git Change scode libraries to carry both imports and imports-used. --- diff --git a/src/runtime/library-scode.scm b/src/runtime/library-scode.scm index 3902fcdc3..f80cab872 100644 --- a/src/runtime/library-scode.scm +++ b/src/runtime/library-scode.scm @@ -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)) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 4edba5cb7..d6aeab13c 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -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) diff --git a/src/sf/sf.pkg b/src/sf/sf.pkg index 304b20bef..a838fd116 100644 --- a/src/sf/sf.pkg +++ b/src/sf/sf.pkg @@ -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) diff --git a/src/sf/toplev.scm b/src/sf/toplev.scm index e01d93584..85300ea57 100644 --- a/src/sf/toplev.scm +++ b/src/sf/toplev.scm @@ -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