mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 04:15:36 +02:00
Ensure <prompt> handler is values handler
* module/language/tree-il/primitives.scm (call-with-prompt): Only pass "values handlers" as handler: lambdas with only req and rest args, and only one clause. * module/language/tree-il/compile-cps.scm (canonicalize): Remove eta-conversion pass here. * test-suite/tests/peval.test ("partial evaluation"): Adapt test.
This commit is contained in:
parent
d6b6daca37
commit
167350db21
3 changed files with 46 additions and 34 deletions
|
@ -1223,13 +1223,21 @@
|
|||
(call-with-prompt tag
|
||||
(lambda () 1)
|
||||
handler)
|
||||
(prompt #f
|
||||
(toplevel tag)
|
||||
(lambda _
|
||||
(lambda-case
|
||||
((() #f #f #f () ())
|
||||
(const 1))))
|
||||
(toplevel handler)))
|
||||
(let (handler) (_) ((toplevel handler))
|
||||
(if (primcall procedure? (lexical handler _))
|
||||
(prompt #f
|
||||
(toplevel tag)
|
||||
(lambda _
|
||||
(lambda-case
|
||||
((() #f #f #f () ())
|
||||
(const 1))))
|
||||
(lambda _
|
||||
(lambda-case
|
||||
((() #f args #f () (_))
|
||||
(primcall apply
|
||||
(lexical handler _)
|
||||
(lexical args _))))))
|
||||
(primcall throw . _))))
|
||||
|
||||
(pass-if-peval
|
||||
;; `while' without `break' or `continue' has no prompts and gets its
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue