1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 22:10:21 +02:00

some with-fluid* -> with-fluids

* module/ice-9/boot-9.scm (false-if-exception, load)
  (try-module-autoload):
* module/language/tree-il/compile-glil.scm (compile-glil): Turn some
  with-fluid* invocations into with-fluids.
This commit is contained in:
Andy Wingo 2010-03-04 16:50:11 +01:00
parent 2150e9a84a
commit eddd16d782
2 changed files with 22 additions and 25 deletions

View file

@ -570,8 +570,8 @@ If there is no handler at all, Guile prints an error and then exits."
`(catch #t
(lambda ()
;; avoid saving backtraces inside false-if-exception
(with-fluid* the-last-stack (fluid-ref the-last-stack)
(lambda () ,expr)))
(with-fluids ((the-last-stack (fluid-ref the-last-stack)))
,expr))
(lambda args #f)))
@ -1100,15 +1100,14 @@ If there is no handler at all, Guile prints an error and then exits."
";;; WARNING: compilation of ~a failed:\n;;; key ~a, throw_args ~s\n"
name k args)
#f)))
(with-fluid* current-reader (and (pair? reader) (car reader))
(lambda ()
(let ((cfn (and=> (and=> (false-if-exception (canonicalize-path name))
compiled-file-name)
fresh-compiled-file-name)))
(if cfn
(load-compiled cfn)
(start-stack 'load-stack
(primitive-load name)))))))
(with-fluids ((current-reader (and (pair? reader) (car reader))))
(let ((cfn (and=> (and=> (false-if-exception (canonicalize-path name))
compiled-file-name)
fresh-compiled-file-name)))
(if cfn
(load-compiled cfn)
(start-stack 'load-stack
(primitive-load name))))))
@ -2567,15 +2566,14 @@ module '(ice-9 q) '(make-q q-length))}."
(dynamic-wind
(lambda () (autoload-in-progress! dir-hint name))
(lambda ()
(with-fluid* current-reader #f
(lambda ()
(save-module-excursion
(lambda ()
(if version
(load (find-versioned-module
dir-hint name version %load-path))
(primitive-load-path (in-vicinity dir-hint name) #f))
(set! didit #t))))))
(with-fluids ((current-reader #f))
(save-module-excursion
(lambda ()
(if version
(load (find-versioned-module
dir-hint name version %load-path))
(primitive-load-path (in-vicinity dir-hint name) #f))
(set! didit #t)))))
(lambda () (set-autoloaded! dir-hint name didit)))
didit))))

View file

@ -65,11 +65,10 @@
(x (optimize! x e opts))
(allocation (analyze-lexicals x)))
(with-fluid* *comp-module* e
(lambda ()
(values (flatten-lambda x #f allocation)
e
e)))))
(with-fluids ((*comp-module* e))
(values (flatten-lambda x #f allocation)
e
e))))