[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0d6f3f134e4 3/6: Generalize 'comp-cstr-symbol-p'
From: |
Andrea Corallo |
Subject: |
master 0d6f3f134e4 3/6: Generalize 'comp-cstr-symbol-p' |
Date: |
Thu, 11 Jul 2024 10:27:29 -0400 (EDT) |
branch: master
commit 0d6f3f134e4e9e41df86e015ea5cfc0a990b62e5
Author: Andrea Corallo <acorallo@gnu.org>
Commit: Andrea Corallo <acorallo@gnu.org>
Generalize 'comp-cstr-symbol-p'
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-symbol-p): Make use of
'comp-cstr-type-p'.
---
lisp/emacs-lisp/comp-cstr.el | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 058fc522858..66c44f16835 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -926,15 +926,6 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
(> high most-positive-fixnum))
t))))))
-(defun comp-cstr-symbol-p (cstr)
- "Return t if CSTR is certainly a symbol."
- (with-comp-cstr-accessors
- (and (null (range cstr))
- (null (neg cstr))
- (and (or (null (typeset cstr))
- (equal (typeset cstr) '(symbol)))
- (cl-every #'symbolp (valset cstr))))))
-
(defsubst comp-cstr-cons-p (cstr)
"Return t if CSTR is certainly a cons."
(with-comp-cstr-accessors
@@ -965,6 +956,10 @@ Non memoized version of `comp-cstr-intersection-no-mem'."
(error "Unknown predicate for type %s" type)))))
t))
+(defun comp-cstr-symbol-p (cstr)
+ "Return t if CSTR is certainly a symbol."
+ (comp-cstr-type-p cstr 'symbol))
+
;; Move to comp.el?
(defsubst comp-cstr-cl-tag-p (cstr)
"Return non-nil if CSTR is a CL tag."
- master updated (c3e6923b004 -> dc8cde2b6f3), Andrea Corallo, 2024/07/11
- master a1775552cef 2/6: Add 'comp-type-check-optim' pass, Andrea Corallo, 2024/07/11
- master 8538a281f53 1/6: Split 'comp--ssa' code, Andrea Corallo, 2024/07/11
- master ffaf1cb235c 5/6: Some clean-up in comp-tests.el, Andrea Corallo, 2024/07/11
- master 0d6f3f134e4 3/6: Generalize 'comp-cstr-symbol-p',
Andrea Corallo <=
- master baf74968f97 4/6: Fix 'comp--type-check-optim-block' it using 'comp-cstr-type-p', Andrea Corallo, 2024/07/11
- master dc8cde2b6f3 6/6: Add a type-check--optim test, Andrea Corallo, 2024/07/11