1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00

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.
This commit is contained in:
Andy Wingo 2014-01-10 16:40:24 +01:00
parent f409295892
commit c79f873eb1

View file

@ -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))