Emit inline functions as primitives

This commit is contained in:
Justin Ethier 2017-04-04 08:14:39 +00:00
parent 4f724b6eaf
commit 1a28889caf

View file

@ -547,7 +547,14 @@
;; c-compile-prim : prim-exp -> string -> string
(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
;; create a new closure for the continuation, if needed.
;;