From 7d7888d2ba4efa3498513ec6445485bedba31aaa Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 5 Oct 2011 19:12:15 -0600 Subject: [PATCH] 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: 7680adf486d875dc75d2f5b13a94fc907b36498e --- collects/compiler/zo-parse.rkt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/collects/compiler/zo-parse.rkt b/collects/compiler/zo-parse.rkt index 6c9493537b..5f47e9cc54 100644 --- a/collects/compiler/zo-parse.rkt +++ b/collects/compiler/zo-parse.rkt @@ -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))