mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 20:45:06 +02:00
Emit inline functions as primitives
This commit is contained in:
parent
4f724b6eaf
commit
1a28889caf
1 changed files with 8 additions and 1 deletions
|
@ -547,7 +547,14 @@
|
||||||
|
|
||||||
;; c-compile-prim : prim-exp -> string -> string
|
;; c-compile-prim : prim-exp -> string -> string
|
||||||
(define (c-compile-prim p cont)
|
(define (c-compile-prim p cont)
|
||||||
(let* ((c-func (prim->c-func p))
|
(let* ((c-func
|
||||||
|
(if (prim:udf? p)
|
||||||
|
(string-append
|
||||||
|
"((inline_function_type)
|
||||||
|
((closure)"
|
||||||
|
(cgen:mangle-global p)
|
||||||
|
")->fn)")
|
||||||
|
(prim->c-func p)))
|
||||||
;; Following closure defs are only used for prim:cont? to
|
;; Following closure defs are only used for prim:cont? to
|
||||||
;; create a new closure for the continuation, if needed.
|
;; create a new closure for the continuation, if needed.
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue