[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)))
- [Guile-commits] branch master updated (64acf24 -> da7144d), Andy Wingo, 2017/12/06
- [Guile-commits] 01/08: Bailouts can continue directly to tail, Andy Wingo, 2017/12/06
- [Guile-commits] 03/08: CPS conversion residualizes undefined? predicate, Andy Wingo, 2017/12/06
- [Guile-commits] 04/08: Re-mark "throw" et al as not having fallthrough, Andy Wingo, 2017/12/06
- [Guile-commits] 05/08: Assignment conversion uses unchecked memory accessors, Andy Wingo, 2017/12/06
- [Guile-commits] 06/08: Fix DCE over primcall setters with params, Andy Wingo, 2017/12/06
- [Guile-commits] 02/08: Add scm-ref, etc instructions for generic heap object field access, Andy Wingo, 2017/12/06
- [Guile-commits] 07/08: Support closure annotations to scm-ref et al,
Andy Wingo <=
- [Guile-commits] 08/08: Use unchecked scm-ref/set in closure conversion, Andy Wingo, 2017/12/06