impc:ir:compiler:native-call   scheme


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

Implementation

(define impc:ir:compiler:native-call
  (lambda (ast types)
    ;; (println 'ast: ast 'types: types)
    (let* ((os (make-string 0))
           (fname (symbol->string (car ast)))
           (ftypes (or (impc:ti:get-closure-arg-types fname)
                       (impc:ti:get-nativefunc-arg-types fname)))
           (args (map (lambda (a hint)
                        (cons (impc:ir:compiler a types (impc:ir:get-type-from-str hint)) (impc:ir:gname)))
                      (cdr ast)
                      (cdr ftypes))))
      (if (<> (length args) (length (cdr ftypes)))
          (impc:compiler:print-bad-arity-error ast))


Back to Index