impc:ir:make-function-str   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/llvmir.xtm

Implementation

(define impc:ir:make-function-str
  (lambda (t . with-env-added?)
    (let* ((os (make-string 0))
           (args (cdr t)))
      (if (car with-env-added?)
          (emit (string-append (impc:ir:get-type-str (car t))
                               " (i8*, i8*"
                               (if (null? args)
                                   ""
                                   ", "))
                os)
          (emit  (impc:ir:get-type-str (car t)) " (" os))
      (dotimes (i (length args))
        (if (> i 0) (emit ", " os))
        (if (symbol? (list-ref args i))
            (impc:compiler:print-could-not-resolve-type-error (list-ref args i)))
        (emit (impc:ir:get-type-str (list-ref args i)) os))
      (emit ")" os)
      (impc:ir:strip-space os))))


Back to Index