mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-12 08:40:20 +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>
|
2001-04-15 Keisuke Nishida <kxn30@po.cwru.edu>
|
||||||
|
|
||||||
* boot-9.scm (call-with-deprecation): New procedure.
|
* boot-9.scm (call-with-deprecation): New procedure.
|
||||||
|
|
|
@ -1727,6 +1727,10 @@
|
||||||
(module-constructor #() '() b #f #f name 'autoload
|
(module-constructor #() '() b #f #f name 'autoload
|
||||||
'() (make-weak-value-hash-table 31) 0)))
|
'() (make-weak-value-hash-table 31) 0)))
|
||||||
|
|
||||||
|
;;; {Compiled module}
|
||||||
|
|
||||||
|
(define load-compiled #f)
|
||||||
|
|
||||||
|
|
||||||
;;; {Autoloading modules}
|
;;; {Autoloading modules}
|
||||||
|
|
||||||
|
@ -1743,14 +1747,20 @@
|
||||||
(resolve-module dir-hint-module-name #f)
|
(resolve-module dir-hint-module-name #f)
|
||||||
(and (not (autoload-done-or-in-progress? dir-hint name))
|
(and (not (autoload-done-or-in-progress? dir-hint name))
|
||||||
(let ((didit #f))
|
(let ((didit #f))
|
||||||
|
(define (load-file proc file)
|
||||||
|
(save-module-excursion (lambda () (proc file)))
|
||||||
|
(set! didit #t))
|
||||||
(dynamic-wind
|
(dynamic-wind
|
||||||
(lambda () (autoload-in-progress! dir-hint name))
|
(lambda () (autoload-in-progress! dir-hint name))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ((full (%search-load-path (in-vicinity dir-hint name))))
|
(let ((file (in-vicinity dir-hint name)))
|
||||||
(if full
|
(cond ((and load-compiled
|
||||||
(begin
|
(%search-load-path (string-append file ".go")))
|
||||||
(save-module-excursion (lambda () (primitive-load full)))
|
=> (lambda (full)
|
||||||
(set! didit #t)))))
|
(load-file load-compiled full)))
|
||||||
|
((%search-load-path file)
|
||||||
|
=> (lambda (full)
|
||||||
|
(load-file primitive-load full))))))
|
||||||
(lambda () (set-autoloaded! dir-hint name didit)))
|
(lambda () (set-autoloaded! dir-hint name didit)))
|
||||||
didit))))
|
didit))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue