impc:ir:pointer++   scheme


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

Implementation

(define impc:ir:pointer++
  (lambda (type . ptr-depth)
    (if (null? ptr-depth)
        (set! ptr-depth 1)
        (set! ptr-depth (car ptr-depth)))
    (if (string? type) ;; this used to check for tuple? as well
        (string-append type (make-string ptr-depth #\*))
        (if (or (impc:ir:closure? type)
                (impc:ir:array? type)
                (impc:ir:vector? type)
                (impc:ir:tuple? type))
            (let ((nl (cl:copy-list (if (string? type) (impc:ir:get-type-from-str type) type))))
              (set-car! nl (+ (impc:ir:str-list-check type) (* *impc:ir:pointer* ptr-depth)))
              nl)
            (+ (impc:ir:str-list-check type) (* *impc:ir:pointer* ptr-depth))))))


Back to Index