sys:compile-ll-from-str   scheme


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

Implementation

;; to compile the special init.ll file (which needs to be done on most
;; startups)
(define sys:compile-ll-from-str
  (lambda (str)
    (let ((print? #f))
      (if (string=? (ipc:get-process-name) *impc:compiler:process*)
          (let ((init-ll-string str))
            (if (and init-ll-string (llvm:compile-ir init-ll-string))
                (if print?
                    (begin
                      (print "\nCompiling ")
                      (print-with-colors 'blue 'default #t (print name))
                      (print "... ")
                      (print-with-colors 'green 'default #t (print "done"))
                      (print "\n\n"))
                    #t)
                (begin
                  (print-with-colors 'red 'default #t (print "\n\nError compiling " name " IR\n\n"))
                  (print "This is pretty bad.  Exiting...\n")
                  (quit 1))))))))


Back to Index