mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 23:00:22 +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:
parent
88e5caded5
commit
73ba69a633
1 changed files with 14 additions and 4 deletions
|
@ -274,10 +274,20 @@ x
|
||||||
a-cont
|
a-cont
|
||||||
@result{} special-binding
|
@result{} special-binding
|
||||||
@end lisp"
|
@end lisp"
|
||||||
(if (thunk? out)
|
;; FIXME: Here we don't check that the out procedure is a thunk before
|
||||||
(in)
|
;; calling the in-guard, as dynamic-wind is called as part of loading
|
||||||
(scm-error 'wrong-type-arg "dynamic-wind" "Not a thunk: ~S"
|
;; modules, but thunk? requires loading (system vm debug). This is in
|
||||||
(list out) #f))
|
;; 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)
|
((@@ primitive wind) in out)
|
||||||
(call-with-values thunk
|
(call-with-values thunk
|
||||||
(lambda vals
|
(lambda vals
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue