[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/native-comp-cl c3ddcf7 1/2: * lisp/emacs-lisp/cl-macs.el (cl-the
From: |
Andrea Corallo |
Subject: |
scratch/native-comp-cl c3ddcf7 1/2: * lisp/emacs-lisp/cl-macs.el (cl-the): Emit compiler hints when native. |
Date: |
Tue, 1 Sep 2020 16:57:59 -0400 (EDT) |
branch: scratch/native-comp-cl
commit c3ddcf739f0406d4897bf6e1339f5514f36649b3
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* lisp/emacs-lisp/cl-macs.el (cl-the): Emit compiler hints when native.
---
lisp/emacs-lisp/cl-macs.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index c38019d..75da039 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -2332,7 +2332,13 @@ values. For compatibility, (cl-values A B C) is a
synonym for (list A B C).
(if (not (or (not (cl--compiling-file))
(< cl--optimize-speed 3)
(= cl--optimize-safety 3)))
- form
+ (if (and (boundp 'byte-native-compiling)
+ byte-native-compiling)
+ (cl-case type
+ (fixnum `(comp-hint-fixnum ,form))
+ (cons `(comp-hint-cons ,form))
+ (otherwise form))
+ form)
(macroexp-let2 macroexp-copyable-p temp form
`(progn (unless (cl-typep ,temp ',type)
(signal 'wrong-type-argument