projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6aad350
)
Fix recent change to SHALLOW-FLUID-BIND.
author
Taylor R Campbell
<campbell@mumble.net>
Thu, 7 Oct 2010 05:47:30 +0000
(
05:47
+0000)
committer
Taylor R Campbell
<campbell@mumble.net>
Thu, 7 Oct 2010 05:47:30 +0000
(
05:47
+0000)
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).
src/runtime/mit-macros.scm
patch
|
blob
|
history
diff --git
a/src/runtime/mit-macros.scm
b/src/runtime/mit-macros.scm
index c181de728c364a4130f9c471eaac1f938a920b39..bbfe5acb3738a0d8e5aebed5c38fa56a49668240 100644
(file)
--- 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)