"Byte compile FUNCTION-NAME spilling data from the byte compiler."
(let* ((f (symbol-function function-name))
(func (make-comp-func :name function-name
- :c-name (comp-c-func-name function-name"F"))))
+ :c-name (comp-c-func-name function-name"F")
+ :doc (documentation f)
+ :int-spec (interactive-form f))))
(when (byte-code-function-p f)
(signal 'native-compiler-error
"can't native compile an already bytecompiled function"))
(ert-deftest comp-tests-free-fun ()
"Check we are able to compile a single function."
(defun comp-tests-free-fun-f ()
+ "Some doc."
+ (interactive)
3)
(load (native-compile #'comp-tests-free-fun-f))
+
(should (subr-native-elisp-p (symbol-function #'comp-tests-free-fun-f)))
- (should (= (comp-tests-free-fun-f) 3)))
+ (should (= (comp-tests-free-fun-f) 3))
+ (should (string= (documentation #'comp-tests-free-fun-f)
+ "Some doc."))
+ (should (commandp #'comp-tests-free-fun-f))
+ (should (equal (interactive-form #'comp-tests-free-fun-f)
+ '(interactive))))
\f
;;;;;;;;;;;;;;;;;;;;