From eddd16d782343fbc10818e4f2ee706774921f051 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 4 Mar 2010 16:50:11 +0100 Subject: [PATCH] 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. --- module/ice-9/boot-9.scm | 38 +++++++++++------------- module/language/tree-il/compile-glil.scm | 9 +++--- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index 1c13d7088..0b4f83c88 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -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)))) diff --git a/module/language/tree-il/compile-glil.scm b/module/language/tree-il/compile-glil.scm index 197daf2a0..b45423a3c 100644 --- a/module/language/tree-il/compile-glil.scm +++ b/module/language/tree-il/compile-glil.scm @@ -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))))