impc:ti:get-type-for-gpoly   scheme


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

Implementation

(define impc:ti:get-type-for-gpoly
  (lambda (t)
    (cons (real->integer (+ *impc:ir:closure* (* (+ (impc:ir:get-ptr-depth t) 1) *impc:ir:pointer*)))
          (map (lambda (k)
                 ;; (println 'kk k)
                 (if (regex:match? k "^\\[")
                     (impc:ti:get-type-for-gpoly k)
                     (if (string-contains? k ":") ;; if generic either gvar of named type
                         (string->symbol k)
                         (if (regex:match? k "^[A-Za-z0-9]*{")
                             (string->symbol k)
                             (impc:ir:get-type-from-pretty-str k)))))
               (impc:ir:get-pretty-closure-arg-strings t)))))


Back to Index