guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 07/08: Support closure annotations to scm-ref et al


From: Andy Wingo
Subject: [Guile-commits] 07/08: Support closure annotations to scm-ref et al
Date: Wed, 6 Dec 2017 07:59:44 -0500 (EST)

wingo pushed a commit to branch master
in repository guile.

commit 4dca2c5cfbbc68a76cb2b4f8ef6f4482a2dc906c
Author: Andy Wingo <address@hidden>
Date:   Wed Dec 6 13:45:24 2017 +0100

    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.
---
 module/language/cps/effects-analysis.scm | 3 ++-
 module/language/cps/types.scm            | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/module/language/cps/effects-analysis.scm 
b/module/language/cps/effects-analysis.scm
index 4105bfa..3040451 100644
--- a/module/language/cps/effects-analysis.scm
+++ b/module/language/cps/effects-analysis.scm
@@ -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)))
diff --git a/module/language/cps/types.scm b/module/language/cps/types.scm
index 62c9d50..9a1c6f2 100644
--- a/module/language/cps/types.scm
+++ b/module/language/cps/types.scm
@@ -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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]