Make function for adding an unboxed function.

original commit: c76ec838cf8d7ee2864eded6e300291d82d1b1e2
This commit is contained in:
Eric Dobson 2013-09-18 09:43:48 -07:00
parent 788ef23b07
commit 071e56bb44
2 changed files with 5 additions and 3 deletions

View File

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

View File

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