]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix free function compilation
authorAndrea Corallo <akrl@sdf.org>
Sun, 29 Mar 2020 10:21:55 +0000 (11:21 +0100)
committerAndrea Corallo <akrl@sdf.org>
Sun, 29 Mar 2020 11:30:33 +0000 (12:30 +0100)
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/comp.el

index 977f137b7931b741229257d7d61eab0945844d72..b36310744728756ce7104e2790d64b89d80c7114 100644 (file)
@@ -3120,7 +3120,8 @@ for symbols generated by the byte compiler itself."
              (out (list 'byte-code (byte-compile-lapcode byte-compile-output)
                        byte-compile-vector byte-compile-maxdepth)))
         (when (and byte-native-compiling
-                   (null byte-compile-not-top-level))
+                   (or (null byte-compile-not-top-level)
+                       (eq byte-native-compiling 'free-func)))
           ;; Spill LAP for the native compiler here
           (push (cons byte-compile-current-form byte-compile-output)
                 byte-to-native-lap))
index 92d0655ffdc0f57ff151d3ee6d9dc59750099821..d29e2f55f1f577c32cadb4e3878758d531778053 100644 (file)
@@ -514,7 +514,8 @@ Put PREFIX in front of it."
 
 (cl-defgeneric comp-spill-lap-function ((function-name symbol))
   "Byte compile FUNCTION-NAME spilling data from the byte compiler."
-  (let* ((f (symbol-function function-name))
+  (let* ((byte-native-compiling 'free-func)
+         (f (symbol-function function-name))
          (c-name (comp-c-func-name function-name "F"))
          (func (make-comp-func :name function-name
                                :c-name c-name
@@ -536,8 +537,8 @@ Put PREFIX in front of it."
                 (comp-func-frame-size func)
                 (comp-byte-frame-size (comp-func-byte-func func))))
         (setf (comp-ctxt-top-level-forms comp-ctxt)
-              (list (make-byte-to-native-function :name function-name)))
-        (setf (byte-to-native-function-c-name func) c-name)
+              (list (make-byte-to-native-function :name function-name
+                                                  :c-name c-name)))
         ;; Create the default array.
         (puthash 0 (comp-func-frame-size func) (comp-func-array-h func))
         (comp-add-func-to-ctxt func))))