mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-08 02:40:17 +02:00
* boot-9.scm (load-compiled): New variable, initialized in the VM.
(try-module-autoload): Try loading compiled modules if applicable.
This commit is contained in:
parent
56426fdbaf
commit
ff5546f5c6
2 changed files with 20 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-04-15 Keisuke Nishida <kxn30@po.cwru.edu>
|
||||
|
||||
* boot-9.scm (load-compiled): New variable, initialized in the VM.
|
||||
(try-module-autoload): Try loading compiled modules if applicable.
|
||||
|
||||
2001-04-15 Keisuke Nishida <kxn30@po.cwru.edu>
|
||||
|
||||
* boot-9.scm (call-with-deprecation): New procedure.
|
||||
|
|
|
@ -1727,6 +1727,10 @@
|
|||
(module-constructor #() '() b #f #f name 'autoload
|
||||
'() (make-weak-value-hash-table 31) 0)))
|
||||
|
||||
;;; {Compiled module}
|
||||
|
||||
(define load-compiled #f)
|
||||
|
||||
|
||||
;;; {Autoloading modules}
|
||||
|
||||
|
@ -1743,14 +1747,20 @@
|
|||
(resolve-module dir-hint-module-name #f)
|
||||
(and (not (autoload-done-or-in-progress? dir-hint name))
|
||||
(let ((didit #f))
|
||||
(define (load-file proc file)
|
||||
(save-module-excursion (lambda () (proc file)))
|
||||
(set! didit #t))
|
||||
(dynamic-wind
|
||||
(lambda () (autoload-in-progress! dir-hint name))
|
||||
(lambda ()
|
||||
(let ((full (%search-load-path (in-vicinity dir-hint name))))
|
||||
(if full
|
||||
(begin
|
||||
(save-module-excursion (lambda () (primitive-load full)))
|
||||
(set! didit #t)))))
|
||||
(let ((file (in-vicinity dir-hint name)))
|
||||
(cond ((and load-compiled
|
||||
(%search-load-path (string-append file ".go")))
|
||||
=> (lambda (full)
|
||||
(load-file load-compiled full)))
|
||||
((%search-load-path file)
|
||||
=> (lambda (full)
|
||||
(load-file primitive-load full))))))
|
||||
(lambda () (set-autoloaded! dir-hint name didit)))
|
||||
didit))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue