Subject: bug#48221: 28.0.50; defsubsts aren't native compiled?

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 05 May 2021 11:36:02 +0200

Andrea Corallo <[email-masked]> writes:

> AFAIR having the defsubst non native compiled is what we want as we need
> the bytecode definition to have the inline to be performed.  Actually
> the test is verifying that the defsubst is *not* native compiled.
>
> I tried to reproduce here (0c993ed1d3) but for me the test is passing,
> that's odd...

Hm, odd.  The two tests here are:

----
(ert-deftest help-fns-test-lisp-defun ()
  (let ((regexp (if (boundp 'comp-ctxt)
                    "a native compiled Lisp function in .+subr\\.el"
                  "a compiled Lisp function in .+subr\\.el"))
        (result (help-fns-tests--describe-function 'last)))
    (should (string-match regexp result))))

(ert-deftest help-fns-test-lisp-defsubst ()
  (let ((regexp (if (boundp 'comp-ctxt)
                    "a native compiled Lisp function in .+subr\\.el"
                  "a compiled Lisp function in .+subr\\.el"))
        (result (help-fns-tests--describe-function 'posn-window)))
    (should (string-match regexp result))))
----

Unless I'm really misreading something here, they both seem to expect
the native-compiled results?

(A related question -- is (boundp 'comp-ctxt) really the best way to
test for whether we have a native-compiled Emacs?  That's just a defvar
in comp-cstr.el...)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no