summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-06-05 17:10:29 +0200
committerAndy Wingo <wingo@pobox.com>2015-06-05 17:10:29 +0200
commitf41823538a3a35c32bb0d4f23092e37f43d57f1f (patch)
tree9bc5834bca0617bcae4800619546146c64215658 /module
parent6f4487f268e27020084182f8478741793b374e1d (diff)
downloadguile-f41823538a3a35c32bb0d4f23092e37f43d57f1f.tar.gz
Renumber before contifying to eliminate stale conts
* module/language/cps2/contification.scm (contify): Renumber before contifying.
Diffstat (limited to 'module')
-rw-r--r--module/language/cps2/contification.scm9
1 files changed, 7 insertions, 2 deletions
diff --git a/module/language/cps2/contification.scm b/module/language/cps2/contification.scm
index b9944a4f1..e15544af2 100644
--- a/module/language/cps2/contification.scm
+++ b/module/language/cps2/contification.scm
@@ -466,5 +466,10 @@ function set."
conts)))
(define (contify conts)
- (let-values (((call-substs return-substs) (compute-contification conts)))
- (apply-contification conts call-substs return-substs)))
+ ;; FIXME: Renumbering isn't really needed but dead continuations may
+ ;; cause compute-singly-referenced-labels to spuriously mark some
+ ;; conts as irreducible. For now we punt and renumber so that there
+ ;; are only live conts.
+ (let ((conts (renumber conts)))
+ (let-values (((call-substs return-substs) (compute-contification conts)))
+ (apply-contification conts call-substs return-substs))))