From: Taylor R Campbell Date: Thu, 7 Oct 2010 05:47:30 +0000 (+0000) Subject: Fix recent change to SHALLOW-FLUID-BIND. X-Git-Tag: 20101212-Gtk~50 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b74885fc7c9fd4ffc80179a1c57a7e2d2d6ff9b2;p=mit-scheme.git Fix recent change to SHALLOW-FLUID-BIND. This works around lossage with unassigned variables: (define x) (fluid-let ((x 0)) ...) ;Unassigned variable: x This relies on the deprecated semantics of SET! that returns the variable's old value (or old reference trap, if unassigned). --- diff --git a/src/runtime/mit-macros.scm b/src/runtime/mit-macros.scm index c181de728..bbfe5acb3 100644 --- a/src/runtime/mit-macros.scm +++ b/src/runtime/mit-macros.scm @@ -542,10 +542,7 @@ USA. `(,r-let ,(map list temporaries expressions) (,r-define (,swap!) ,@(map (lambda (name temporary) - (let ((temporary* (make-synthetic-identifier 'TEMP))) - `(,r-let ((,temporary* ,temporary)) - (,r-set! ,temporary ,name) - (,r-set! ,name ,temporary*)))) + `(,r-set! ,name (,r-set! ,temporary (,r-set! ,name)))) names temporaries) ,r-unspecific)