From 48e1c3d3c0a5829e5dcb7b59ad8df12a718e18d7 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 23 Oct 2018 17:57:32 -0700 Subject: [PATCH] Rename current-load-library-db to current-library-db. --- src/runtime/library-standard.scm | 5 +++++ src/runtime/load.scm | 7 ++----- src/runtime/runtime.pkg | 4 +--- src/sf/sf.pkg | 2 +- src/sf/toplev.scm | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/runtime/library-standard.scm b/src/runtime/library-standard.scm index 74e5a3f03..5f0c107b4 100644 --- a/src/runtime/library-standard.scm +++ b/src/runtime/library-standard.scm @@ -32,6 +32,11 @@ USA. (define-deferred host-library-db (make-library-db 'host)) +(define-deferred current-library-db + (make-settable-parameter host-library-db + (lambda (value) + (guarantee library-db? value)))) + (define (finish-host-library-db!) (add-standard-libraries! host-library-db)) diff --git a/src/runtime/load.scm b/src/runtime/load.scm index a7f43e83e..280954cde 100644 --- a/src/runtime/load.scm +++ b/src/runtime/load.scm @@ -52,9 +52,6 @@ USA. value)) #f)) -(define-deferred current-load-library-db - (make-unsettable-parameter host-library-db)) - (define-deferred param:eval-unit (make-unsettable-parameter #f (lambda (value) @@ -143,7 +140,7 @@ USA. (let ((scode (loader))) (if purify? (purify (load/purification-root scode))) (if (r7rs-scode-file? scode) - (eval-r7rs-scode-file scode pathname (current-load-library-db)) + (eval-r7rs-scode-file scode pathname (current-library-db)) (extended-scode-eval scode environment))))) (define (source-loader pathname) @@ -151,7 +148,7 @@ USA. (declare (ignore purify?)) (let ((source (read-r7rs-source pathname))) (if source - (eval-r7rs-source source (current-load-library-db)) + (eval-r7rs-source source (current-library-db)) (call-with-input-file pathname (lambda (port) (let loop ((value unspecific)) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 8aefe759a..b13e34014 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -3163,7 +3163,6 @@ USA. built-in-object-file condition-type:not-loading current-load-environment - current-load-library-db current-load-pathname fasl-file? fasload @@ -3178,8 +3177,6 @@ USA. system-uri with-loader-base-uri) (export (runtime) - ;; current-library-db - ;; host-library-db load/purification-root)) (define-package (runtime command-line) @@ -5917,6 +5914,7 @@ USA. (files "library-standard") (parent (runtime library)) (export (runtime) + current-library-db host-library-db standard-library-globals) (export (runtime library) diff --git a/src/sf/sf.pkg b/src/sf/sf.pkg index 49824ff1a..304b20bef 100644 --- a/src/sf/sf.pkg +++ b/src/sf/sf.pkg @@ -40,7 +40,7 @@ USA. sf:enable-argument-deletion? sf:enable-constant-folding?) (import (runtime) - current-load-library-db + current-library-db library-import-to map-r7rs-scode-file map-scode-library diff --git a/src/sf/toplev.scm b/src/sf/toplev.scm index e8b84f0fd..e01d93584 100644 --- a/src/sf/toplev.scm +++ b/src/sf/toplev.scm @@ -267,7 +267,7 @@ USA. (in-phase "Syntax" (lambda () (if (r7rs-source? s-expressions) - (syntax-r7rs-source s-expressions (current-load-library-db)) + (syntax-r7rs-source s-expressions (current-library-db)) (syntax* (if (null? declarations) s-expressions (cons (cons (close-syntax 'declare -- 2.25.1