mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
It's an "eval closure", not an "eval thunk." A thunk is a
function of no arguments. * boot-9.scm (module-type): Rename module field. (make-module, eval-in-module, make-root-module, set-current-module): Uses changed. (module-eval-closure, set-module-eval-closure!, root-module-closure): Renamed from module-eval-thunk, set-module-eval-thunk!, root-module-thunk. (set-current-module): Change uses of *top-level-lookup-thunk* to *top-level-eval-closure*.
This commit is contained in:
parent
4b28e0b88b
commit
31d50456c4
1 changed files with 10 additions and 10 deletions
|
@ -1098,11 +1098,11 @@
|
||||||
;; A module is characterized by an obarray in which local symbols
|
;; A module is characterized by an obarray in which local symbols
|
||||||
;; are interned, a list of modules, "uses", from which non-local
|
;; are interned, a list of modules, "uses", from which non-local
|
||||||
;; bindings can be inherited, and an optional lazy-binder which
|
;; bindings can be inherited, and an optional lazy-binder which
|
||||||
;; is a (THUNK module symbol) which, as a last resort, can provide
|
;; is a (CLOSURE module symbol) which, as a last resort, can provide
|
||||||
;; bindings that would otherwise not be found locally in the module.
|
;; bindings that would otherwise not be found locally in the module.
|
||||||
;;
|
;;
|
||||||
(define module-type
|
(define module-type
|
||||||
(make-record-type 'module '(obarray uses binder eval-thunk name kind)
|
(make-record-type 'module '(obarray uses binder eval-closure name kind)
|
||||||
%print-module))
|
%print-module))
|
||||||
|
|
||||||
;; make-module &opt size uses binder
|
;; make-module &opt size uses binder
|
||||||
|
@ -1140,7 +1140,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-thunk! module
|
(set-module-eval-closure! module
|
||||||
(lambda (symbol define?)
|
(lambda (symbol define?)
|
||||||
(if define?
|
(if define?
|
||||||
(module-make-local-var! module symbol)
|
(module-make-local-var! module symbol)
|
||||||
|
@ -1155,8 +1155,8 @@
|
||||||
(define set-module-uses! (record-modifier module-type 'uses))
|
(define set-module-uses! (record-modifier module-type 'uses))
|
||||||
(define module-binder (record-accessor module-type 'binder))
|
(define module-binder (record-accessor module-type 'binder))
|
||||||
(define set-module-binder! (record-modifier module-type 'binder))
|
(define set-module-binder! (record-modifier module-type 'binder))
|
||||||
(define module-eval-thunk (record-accessor module-type 'eval-thunk))
|
(define module-eval-closure (record-accessor module-type 'eval-closure))
|
||||||
(define set-module-eval-thunk! (record-modifier module-type 'eval-thunk))
|
(define set-module-eval-closure! (record-modifier module-type 'eval-closure))
|
||||||
(define module-name (record-accessor module-type 'name))
|
(define module-name (record-accessor module-type 'name))
|
||||||
(define set-module-name! (record-modifier module-type 'name))
|
(define set-module-name! (record-modifier module-type 'name))
|
||||||
(define module-kind (record-accessor module-type 'kind))
|
(define module-kind (record-accessor module-type 'kind))
|
||||||
|
@ -1165,7 +1165,7 @@
|
||||||
|
|
||||||
|
|
||||||
(define (eval-in-module exp module)
|
(define (eval-in-module exp module)
|
||||||
(eval2 exp (module-eval-thunk module)))
|
(eval2 exp (module-eval-closure module)))
|
||||||
|
|
||||||
|
|
||||||
;;; {Module Searching in General}
|
;;; {Module Searching in General}
|
||||||
|
@ -1426,7 +1426,7 @@
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
(define (root-module-thunk m s define?)
|
(define (root-module-closure m s define?)
|
||||||
(let ((bi (and (symbol-interned? #f s)
|
(let ((bi (and (symbol-interned? #f s)
|
||||||
(builtin-variable s))))
|
(builtin-variable s))))
|
||||||
(and bi
|
(and bi
|
||||||
|
@ -1436,7 +1436,7 @@
|
||||||
bi))))
|
bi))))
|
||||||
|
|
||||||
(define (make-root-module)
|
(define (make-root-module)
|
||||||
(make-module 1019 '() root-module-thunk))
|
(make-module 1019 '() root-module-closure))
|
||||||
|
|
||||||
|
|
||||||
;; make-scm-module
|
;; make-scm-module
|
||||||
|
@ -1473,8 +1473,8 @@
|
||||||
(define (set-current-module m)
|
(define (set-current-module m)
|
||||||
(set! the-module m)
|
(set! the-module m)
|
||||||
(if m
|
(if m
|
||||||
(set! *top-level-lookup-thunk* (module-eval-thunk the-module))
|
(set! *top-level-lookup-closure* (module-eval-closure the-module))
|
||||||
(set! *top-level-lookup-thunk* #f)))
|
(set! *top-level-lookup-closure* #f)))
|
||||||
|
|
||||||
|
|
||||||
;; current-module
|
;; current-module
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue