Added prim->c-func-uses-alloca?

This commit is contained in:
Justin Ethier 2018-11-22 17:33:06 -05:00
parent 1f1b032641
commit b0e6c42eb1

View file

@ -17,6 +17,7 @@
;; TODO: replace w/list that cannot be precomputed: precompute-prim-app? ;; TODO: replace w/list that cannot be precomputed: precompute-prim-app?
prim-call? prim-call?
prim->c-func prim->c-func
prim->c-func-uses-alloca?
prim/data-arg? prim/data-arg?
prim/c-var-pointer prim/c-var-pointer
prim/c-var-assign prim/c-var-assign
@ -457,6 +458,18 @@
(define (prim-call? exp) (define (prim-call? exp)
(and (list? exp) (prim? (car exp)))) (and (list? exp) (prim? (car exp))))
(define (prim->c-func-uses-alloca? p use-alloca?)
(and
use-alloca?
(member
p
'(cons
Cyc-fast-list-1
Cyc-fast-list-2
Cyc-fast-list-3
Cyc-fast-list-4
cell))))
(define (prim->c-func p use-alloca?) (define (prim->c-func p use-alloca?)
(cond (cond
(use-alloca? (use-alloca?