From 086e0e7cccf6f0dc7edc437726ce1dc629e65966 Mon Sep 17 00:00:00 2001 From: Vincent St-Amour Date: Sun, 14 Aug 2011 20:38:28 -0400 Subject: [PATCH] Fix arity raising for letrec. original commit: 2a80582ed97e93b3c85ae8fbc21bfc7eeab05947 --- .../typed-scheme/optimizer/unboxed-let.rkt | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/collects/typed-scheme/optimizer/unboxed-let.rkt b/collects/typed-scheme/optimizer/unboxed-let.rkt index 5b850329..b1b875e8 100644 --- a/collects/typed-scheme/optimizer/unboxed-let.rkt +++ b/collects/typed-scheme/optimizer/unboxed-let.rkt @@ -101,17 +101,18 @@ (doms doms)) (cond [(null? params) ;; done. can we unbox anything? - (when (> (length unboxed) 0) - ;; if so, add to the table of functions with - ;; unboxed params, so we can modify its call - ;; sites, its body and its header) - (log-optimization - "unboxed function -> table" - arity-raising-opt-msg - fun-name) - (dict-set! unboxed-funs-table fun-name - (list (reverse unboxed) - (reverse boxed))))] + (and (> (length unboxed) 0) + ;; if so, add to the table of functions with + ;; unboxed params, so we can modify its call + ;; sites, its body and its header + (begin (log-optimization + "unboxed function -> table" + arity-raising-opt-msg + fun-name) + #t) + (dict-set! unboxed-funs-table fun-name + (list (reverse unboxed) + (reverse boxed))))] [(and (equal? (car doms) -FloatComplex) (could-be-unboxed-in? (car params) #'(begin body ...)))