mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-15 16:20:17 +02:00
Support closure annotations to scm-ref et al
* module/language/cps/effects-analysis.scm (annotation->memory-kind): * module/language/cps/types.scm (annotation->type): Add pairs and closures.
This commit is contained in:
parent
52e28fd19e
commit
4dca2c5cfb
2 changed files with 5 additions and 2 deletions
|
@ -342,7 +342,8 @@ the LABELS that are clobbered by the effects of LABEL."
|
|||
(match annotation
|
||||
('pair &pair)
|
||||
('vector &vector)
|
||||
('box &box)))
|
||||
('box &box)
|
||||
('closure &closure)))
|
||||
|
||||
(define-primitive-effects* param
|
||||
((allocate-words size) (&allocate (annotation->memory-kind param)))
|
||||
|
|
|
@ -712,8 +712,10 @@ minimum, and maximum."
|
|||
(define (annotation->type ann)
|
||||
;; Expand me!
|
||||
(match ann
|
||||
('pair &pair)
|
||||
('vector &vector)
|
||||
('box &box)))
|
||||
('box &box)
|
||||
('closure &procedure)))
|
||||
|
||||
(define-type-inferrer/param (allocate-words param size result)
|
||||
(define! result (annotation->type param) (&min/0 size) (&max/scm-size size)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue