fix compiler bug related to lifting and unbox flonums

As variables are dropped for lifted functions, the bitmap
for flonum closure variables was not shifted down by the
number of dropped variables.

Closes PR 12259

original commit: 7680adf486
This commit is contained in:
Matthew Flatt 2011-10-05 19:12:15 -06:00
parent a849681b7d
commit 7d7888d2ba

View File

@ -111,12 +111,15 @@
(case (check-bit i)
[(0) 'val]
[(1) 'ref]
[(2) 'flonum])))]
[(2) 'flonum]
[else (error "both 'ref and 'flonum argument?")])))]
[(closure-types) (for/list ([i (in-range closure-size)]
[j (in-naturals num-params)])
(case (check-bit j)
[(0) 'val/ref]
[(2) 'flonum]))])
[(1) (error "invalid 'ref closure variable")]
[(2) 'flonum]
[else (error "both 'ref and 'flonum closure var?")]))])
(make-lam name
(append
(if (zero? (bitwise-and flags flags CLOS_PRESERVES_MARKS)) null '(preserves-marks))