add dynlet to tree-il
* module/language/tree-il.scm (<dynlet>, dynlet?, make-dynlet) (dynlet-src, dynlet-fluids, dynlet-vals, dynlet-body): New tree-il construct, mapping to `with-fluids'. (parse-tree-il, unparse-tree-il, tree-il->scheme, tree-il-fold): (make-tree-il-folder, post-order!, pre-order!): Wire it up. * module/language/tree-il/analyze.scm (analyze-lexicals): Add dynlet support.
This commit is contained in:
parent
bb0229b51d
commit
d7c53a8695
2 changed files with 39 additions and 0 deletions
|
|
@ -339,6 +339,9 @@
|
|||
((<dynwind> body winder unwinder)
|
||||
(lset-union eq? (step body) (step winder) (step unwinder)))
|
||||
|
||||
((<dynlet> fluids vals body)
|
||||
(apply lset-union eq? (step body) (map step (append fluids vals))))
|
||||
|
||||
((<prompt> tag body handler pre-unwind-handler)
|
||||
(lset-union eq? (step tag) (step handler)
|
||||
(if pre-unwind-handler (step pre-unwind-handler) '())))
|
||||
|
|
@ -500,6 +503,9 @@
|
|||
((<dynwind> body winder unwinder)
|
||||
(max (recur body) (recur winder) (recur unwinder)))
|
||||
|
||||
((<dynlet> fluids vals body)
|
||||
(apply max (recur body) (map recur (append fluids vals))))
|
||||
|
||||
((<prompt> tag body handler pre-unwind-handler)
|
||||
(let ((cont-var (and (lambda-case? handler)
|
||||
(pair? (lambda-case-vars handler))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue