impc:ti:try-to-resolve-named-types   scheme


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

Implementation

;; resolve "string" types by looking up get-named-type
;; resolve 'symbol types by looking in vars
;; otherwise just return t
(define impc:ti:try-to-resolve-named-types
  (lambda (t vars)
    ;; check for named types
    (if (string? t)
        (let ((t (impc:ti:get-namedtype-type t))
              (ptr-level (impc:ir:get-ptr-depth t)))
          (dotimes (i ptr-level) (set! t (impc:ir:pointer++ t)))
          (list t))
        (if (symbol? t)
            (if (null? (assoc-strcmp t vars))
                '()
                (cdr (assoc-strcmp t vars)))
            t))))


Back to Index