impc:ti:initialize-closure-with-new-zone   scheme


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

Implementation

(define impc:ti:initialize-closure-with-new-zone
  (lambda (func-name zone-size)
    (if (not (impc:aot:currently-compiling?))
        (let ((setter (llvm:get-function (string-append func-name "_setter"))))
          (if setter
              (begin
                (sys:push-memzone (sys:create-mzone zone-size))
                (llvm:run setter)
                ;; don't destroy - this happens in _setter func
                (sys:pop-memzone))
              (begin
                (error)
                (impc:compiler:print-missing-identifier-error (string->symbol (string-append func-name "_setter")) 'closure-setter)))))))


Back to Index