impc:ir:compiler:num-of-elts   scheme


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

Implementation

(define impc:ir:compiler:num-of-elts
  (lambda (ast types)
    (let* ((t (assoc-strcmp (cadr ast) types)))
      (if (or (null? t)
              (and (not (impc:ir:array? (cdr t)))
                   (not (impc:ir:vector? (cdr t)))))
          (impc:compiler:print-compiler-error "num-of-elts must take a variable of array or vector type not: " (cdr ast)))
      (impc:ir:gname (number->string (cadr (cdr t))) "i64")
      "")))


Back to Index

Similar Entries