1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-07 04:30:18 +02:00

* boot-9.scm (scm-module-closure): New procedure: Was previously

anonymous.  Now needed in modules.c.
(make-module): Use `standard-eval-closure' to create the eval
closure.
This commit is contained in:
Mikael Djurfeldt 2000-06-04 01:34:27 +00:00
parent 4fd1f6529d
commit 6906bd0d7a

View file

@ -1,6 +1,6 @@
;;; installed-scm-file ;;; installed-scm-file
;;;; Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. ;;;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
;;;; ;;;;
;;;; This program is free software; you can redistribute it and/or modify ;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by ;;;; it under the terms of the GNU General Public License as published by
@ -1106,11 +1106,7 @@
;; We can't pass this as an argument to module-constructor, ;; We can't pass this as an argument to module-constructor,
;; because we need it to close over a pointer to the module ;; because we need it to close over a pointer to the module
;; itself. ;; itself.
(set-module-eval-closure! module (set-module-eval-closure! module (standard-eval-closure module))
(lambda (symbol define?)
(if define?
(module-make-local-var! module symbol)
(module-variable module symbol))))
module)))) module))))
@ -1311,6 +1307,9 @@
;; like module-local-variable, except search the uses in the ;; like module-local-variable, except search the uses in the
;; case V is not found in M. ;; case V is not found in M.
;; ;;
;; NOTE: This function is superseded with C code (see modules.c)
;;; when using the standard eval closure.
;;
(define (module-variable m v) (define (module-variable m v)
(module-search module-local-variable m v)) (module-search module-local-variable m v))
@ -1464,17 +1463,17 @@
;; bindings from the symhash table). ;; bindings from the symhash table).
;; ;;
(define (make-scm-module) (define (scm-module-closure m s define?)
(make-module 1019 '() (let ((bi (and (symbol-interned? #f s)
(lambda (m s define?) (builtin-variable s))))
(let ((bi (and (symbol-interned? #f s) (and bi
(builtin-variable s)))) (variable-bound? bi)
(and bi (begin
(variable-bound? bi) (module-add! m s bi)
(begin bi))))
(module-add! m s bi)
bi))))))
(define (make-scm-module)
(make-module 1019 '() scm-module-closure))