[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master b5f171f98f4: * lisp/emacs-lisp/comp.el (comp-function-type-spec):
From: |
Andrea Corallo |
Subject: |
master b5f171f98f4: * lisp/emacs-lisp/comp.el (comp-function-type-spec): Improve. |
Date: |
Sun, 4 Jun 2023 10:26:09 -0400 (EDT) |
branch: master
commit b5f171f98f46ac309e1678b7d1b5ea93f8b4a34d
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* lisp/emacs-lisp/comp.el (comp-function-type-spec): Improve.
---
lisp/emacs-lisp/comp.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 696ed8d21f9..b65da148787 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -4460,9 +4460,11 @@ inferred from the code itself by the native compiler; if
it is
type-spec )
(when-let ((res (gethash function comp-known-func-cstr-h)))
(setf type-spec (comp-cstr-to-type-spec res)))
- (unless type-spec
- (setf kind 'inferred
- type-spec (subr-type (symbol-function function))))
+ (let ((f (symbol-function function)))
+ (when (and (null type-spec)
+ (subr-native-elisp-p f))
+ (setf kind 'inferred
+ type-spec (subr-type f))))
(when type-spec
(cons type-spec kind))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master b5f171f98f4: * lisp/emacs-lisp/comp.el (comp-function-type-spec): Improve.,
Andrea Corallo <=