From 8417180e3cbead446fc92be81de4f8ceaf301a1d Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Thu, 13 Nov 2014 15:25:29 -0700 Subject: [PATCH] Unfluidize (runtime boot-definitions) internal boot-inits. Replace the fluid-let with its expansion into a dynamic-wind, which works only if the bootstrap proceeds in one thread and thus thread-local values for boot-inits are not needed. --- src/runtime/boot.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/runtime/boot.scm b/src/runtime/boot.scm index ccec68b82..0dcfb41ea 100644 --- a/src/runtime/boot.scm +++ b/src/runtime/boot.scm @@ -145,9 +145,16 @@ USA. (define (load-with-boot-inits! . arguments) (receive (value inits) - (fluid-let ((boot-inits '())) - (let ((value (apply load arguments))) - (values value (reverse! boot-inits)))) + (let ((inner '())) + (define (swap!) + (set! boot-inits (set! inner (set! boot-inits))) + unspecific) + (dynamic-wind + swap! + (lambda () + (let ((value (apply load arguments))) + (values value (reverse! boot-inits)))) + swap!)) (for-each (lambda (init) (init)) inits) value)) -- 2.25.1