diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt index 6823b56a..8394847e 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt @@ -100,9 +100,7 @@ ;; if so, add to the table of functions with ;; unboxed params, so we can modify its call ;; sites, its body and its header - (dict-set! unboxed-funs-table fun-name - (list (reverse unboxed) - (reverse boxed))))] + (add-unboxed-fun! fun-name unboxed boxed))] [(and (equal? (car doms) -FloatComplex) (could-be-unboxed-in? (car params) #'(begin body ...))) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-tables.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-tables.rkt index 25c3fd00..0d46442c 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-tables.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-tables.rkt @@ -6,6 +6,7 @@ (provide unboxed-funs-table + add-unboxed-fun! add-unboxed-var! unboxed-var) @@ -35,3 +36,6 @@ ;; the new calling convention for these functions have all real parts of unboxed ;; params first, then all imaginary parts, then all boxed arguments (define unboxed-funs-table (make-free-id-table)) + +(define (add-unboxed-fun! fun-name unboxed boxed) + (dict-set! unboxed-funs-table fun-name (list unboxed boxed)))