Function: comp--emit-lambda-for-top-level
comp--emit-lambda-for-top-level is a byte-compiled function defined in
comp.el.gz.
Signature
(comp--emit-lambda-for-top-level FUNC)
Documentation
Emit the creation of subrs for lambda FUNC.
These are stored in the reloc data array.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
(defun comp--emit-lambda-for-top-level (func)
"Emit the creation of subrs for lambda FUNC.
These are stored in the reloc data array."
(let ((args (comp--prepare-args-for-top-level func)))
(let ((comp-curr-allocation-class 'd-impure))
(comp--add-const-to-relocs (comp-func-byte-func func)))
(comp--emit
(comp--call 'comp--register-lambda
;; mvar to be fixed-up when containers are
;; finalized.
(or (gethash (comp-func-byte-func func)
(comp-ctxt-lambda-fixups-h comp-ctxt))
(puthash (comp-func-byte-func func)
(make--comp-mvar :constant nil)
(comp-ctxt-lambda-fixups-h comp-ctxt)))
(make--comp-mvar :constant (comp-func-c-name func))
(car args)
(cdr args)
(setf (comp-func-type func)
(make--comp-mvar :constant nil))
(make--comp-mvar
:constant
(list
(let* ((h (comp-ctxt-function-docs comp-ctxt))
(i (hash-table-count h)))
(puthash i (comp-func-doc func) h)
i)
(comp-func-int-spec func)
(comp-func-command-modes func)))
;; This is the compilation unit it-self passed as
;; parameter.
(make--comp-mvar :slot 0)))))