mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-07 05:06:36 +02:00
Added prim->c-func-uses-alloca?
This commit is contained in:
parent
1f1b032641
commit
b0e6c42eb1
1 changed files with 13 additions and 0 deletions
|
@ -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?
|
||||||
|
|
Loading…
Add table
Reference in a new issue