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

Dynamic-wind doesn't call thunk? on the out-guard.

* module/ice-9/boot-9.scm (dynamic-wind): Remove the thunk? check of the
  out-guard.
This commit is contained in:
Andy Wingo 2013-10-27 11:40:55 +01:00
parent 88e5caded5
commit 73ba69a633

View file

@ -274,10 +274,20 @@ x
a-cont
@result{} special-binding
@end lisp"
(if (thunk? out)
(in)
(scm-error 'wrong-type-arg "dynamic-wind" "Not a thunk: ~S"
(list out) #f))
;; FIXME: Here we don't check that the out procedure is a thunk before
;; calling the in-guard, as dynamic-wind is called as part of loading
;; modules, but thunk? requires loading (system vm debug). This is in
;; contrast to the open-coded version of dynamic-wind, which does
;; currently insert an eager thunk? check (but often optimizes it
;; out). Not sure what the right thing to do is here -- make thunk?
;; callable before modules are loaded, live with this inconsistency,
;; or remove the thunk? check from the compiler? Questions,
;; questions.
#;
(unless (thunk? out)
(scm-error 'wrong-type-arg "dynamic-wind" "Not a thunk: ~S"
(list out) #f))
(in)
((@@ primitive wind) in out)
(call-with-values thunk
(lambda vals