From c79f873eb15d727986405563c64650e901119c70 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 10 Jan 2014 16:40:24 +0100 Subject: [PATCH] Fix allocate-slots bug * module/language/cps/slot-allocation.scm (allocate-slots): Fix bug in allocate!, whereby a previously hinted allocation would not be added to the live set if a hint was not given later. --- module/language/cps/slot-allocation.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/language/cps/slot-allocation.scm b/module/language/cps/slot-allocation.scm index 9469f035e..245ee129a 100644 --- a/module/language/cps/slot-allocation.scm +++ b/module/language/cps/slot-allocation.scm @@ -278,8 +278,8 @@ are comparable with eqv?. A tmp slot may be used." (define* (allocate! var-idx hint live) (cond ((not (bitvector-ref needs-slotv var-idx)) live) - ((and (not hint) (bitvector-ref needs-hintv var-idx)) live) ((vector-ref slots var-idx) => (cut add-live-slot <> live)) + ((and (not hint) (bitvector-ref needs-hintv var-idx)) live) (else (let ((slot (compute-slot live hint))) (bump-nlocals! (1+ slot))