Recognize cons types in funcall's

This commit is contained in:
Justin Ethier 2015-03-02 22:50:40 -05:00
parent 6fdbf13cbe
commit a2fe40b348

View file

@ -177,7 +177,7 @@
(wrap (lambda (s) (if (> num-args 0) s ""))))
(string-append
"#define funcall" n "(cfn" args ") "
(wrap (string-append "if (prim(cfn)) { Cyc_apply(" n-1 ", (closure)a1, cfn" (if (> num-args 1) (substring args 3 (string-length args)) "") "); }"))
(wrap (string-append "if (type_of(cfn) == cons_tag || prim(cfn)) { Cyc_apply(" n-1 ", (closure)a1, cfn" (if (> num-args 1) (substring args 3 (string-length args)) "") "); }"))
(wrap " else { ")
"((cfn)->fn)(" n ",cfn" args ")"
(wrap ";}")