impc:ti:null-check   scheme


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

Implementation

(define impc:ti:null-check
  (lambda (ast vars kts request?)
    ;; (println 'null-check 'ast: ast 'request? request?)
    (let ((res (if (and (symbol? request?)
                        (string-contains? (symbol->string request?) "##"))
                   (if (assoc-strcmp request? vars)
                       (if (null? (cdr (assoc-strcmp request? vars)))
                           request?
                           (cdr (assoc-strcmp request? vars))))
                   (if (and request?
                            (impc:ir:pointer? request?))
                       (list request?)
                       '())))) ;; forcing to i8* causes problems for generics
                                        ;(list (+ *impc:ir:pointer* *impc:ir:si8*))))))
      res)))


Back to Index