mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-05 11:40:20 +02:00
* * boot-9.scm (top-repl): Use (ice-9 debug) (ice-9 debugger) (ice-9
session) (ice-9 threads) (ice-9 regex) from guile-user only if top-repl is called. This makes startup time for scripts 30% of what it was before... Removed redundant code for loading of readline.
This commit is contained in:
parent
7a37fe8684
commit
00b3396830
1 changed files with 8 additions and 44 deletions
|
@ -2979,7 +2979,14 @@
|
|||
(load-emacs-interface))
|
||||
|
||||
;; Place the user in the guile-user module.
|
||||
(define-module (guile-user))
|
||||
(define-module (guile-user)
|
||||
:use-module (ice-9 session)
|
||||
:use-module (ice-9 debug)
|
||||
:use-module (ice-9 debugger))
|
||||
(if (memq 'threads *features*)
|
||||
(define-module (guile-user) :use-module (ice-9 threads)))
|
||||
(if (memq 'regex *features*)
|
||||
(define-module (guile-user) :use-module (ice-9 regex)))
|
||||
|
||||
(let ((old-handlers #f)
|
||||
(signals `((,SIGINT . "User interrupt")
|
||||
|
@ -3052,49 +3059,6 @@
|
|||
;;;
|
||||
(define exit-hook (make-hook))
|
||||
|
||||
;;; Load readline code into root module if readline primitives are available.
|
||||
;;;
|
||||
;;; Ideally, we wouldn't do this until we were sure we were actually
|
||||
;;; going to enter the repl, but autoloading individual functions is
|
||||
;;; clumsy at the moment.
|
||||
(if (and (memq 'readline *features*)
|
||||
(isatty? (current-input-port)))
|
||||
(begin
|
||||
(define-module (guile) :use-module (ice-9 readline))
|
||||
(define-module (guile-user) :use-module (ice-9 readline))))
|
||||
|
||||
|
||||
;;; {Load debug extension code into user module if debug extensions present.}
|
||||
;;;
|
||||
;;; *fixme* This is a temporary solution.
|
||||
;;;
|
||||
|
||||
(if (memq 'debug-extensions *features*)
|
||||
(define-module (guile-user) :use-module (ice-9 debug)))
|
||||
|
||||
|
||||
;;; {Load session support into user module if present.}
|
||||
;;;
|
||||
;;; *fixme* This is a temporary solution.
|
||||
;;;
|
||||
|
||||
(if (%search-load-path "ice-9/session.scm")
|
||||
(define-module (guile-user) :use-module (ice-9 session)))
|
||||
|
||||
;;; {Load thread code into user module if threads are present.}
|
||||
;;;
|
||||
;;; *fixme* This is a temporary solution.
|
||||
;;;
|
||||
|
||||
(if (memq 'threads *features*)
|
||||
(define-module (guile-user) :use-module (ice-9 threads)))
|
||||
|
||||
|
||||
;;; {Load regexp code if regexp primitives are available.}
|
||||
|
||||
(if (memq 'regex *features*)
|
||||
(define-module (guile-user) :use-module (ice-9 regex)))
|
||||
|
||||
|
||||
(define-module (guile))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue