(or (memq (get name 'byte-optimizer)
'(nil byte-compile-inline-expand))
(error "`%s' is a primitive" name))
- ;; Never native-compile defsubsts as we need the byte
- ;; definition in `byte-compile-unfold-bcf' to perform the
- ;; inlining (Bug#42664).
- (byte-run--set-speed name nil -1)
`(prog1
(defun ,name ,arglist ,@body)
(eval-and-compile
+ ;; Never native-compile defsubsts as we need the byte
+ ;; definition in `byte-compile-unfold-bcf' to perform the
+ ;; inlining (Bug#42664, Bug#43280, Bug#44209).
+ ,(byte-run--set-speed name nil -1)
(put ',name 'byte-optimizer 'byte-compile-inline-expand))))
(defvar advertised-signature-table (make-hash-table :test 'eq :weakness 'key))
(should (subr-native-elisp-p f))
(should (= (funcall f 2) 3))))
+(comp-deftest comp-test-defsubst ()
+ ;; Bug#42664, Bug#43280, Bug#44209.
+ (should-not (subr-native-elisp-p (symbol-function #'comp-test-defsubst-f))))
+
\f
;;;;;;;;;;;;;;;;;;;;;
;; Tromey's tests. ;;