[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0d452d61d05: ; * lisp/emacs-lisp/comp-cstr.el (comp-subtype-p): H
From: |
Mattias Engdegård |
Subject: |
master 0d452d61d05: ; * lisp/emacs-lisp/comp-cstr.el (comp-subtype-p): Hoist above use. |
Date: |
Mon, 30 Oct 2023 06:49:15 -0400 (EDT) |
branch: master
commit 0d452d61d0542cac710360f92fcb7c4fff92445b
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
; * lisp/emacs-lisp/comp-cstr.el (comp-subtype-p): Hoist above use.
---
lisp/emacs-lisp/comp-cstr.el | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index ee0ae10539d..82d48e59a23 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -293,6 +293,14 @@ Return them as multiple value."
(setq notdirect (append notdirect (comp-supertypes parent))))
finally return direct)))
+(defsubst comp-subtype-p (type1 type2)
+ "Return t if TYPE1 is a subtype of TYPE2 or nil otherwise."
+ (let ((types (cons type1 type2)))
+ (or (gethash types (comp-cstr-ctxt-subtype-p-mem comp-ctxt))
+ (puthash types
+ (memq type2 (comp-supertypes type1))
+ (comp-cstr-ctxt-subtype-p-mem comp-ctxt)))))
+
(defun comp--normalize-typeset0 (typeset)
;; For every type search its supertypes. If all the subtypes of a
;; supertype are presents remove all of them, add the identified
@@ -373,14 +381,6 @@ Return them as multiple value."
(if above (comp--intersection x above) x)))))
finally return above))
-(defsubst comp-subtype-p (type1 type2)
- "Return t if TYPE1 is a subtype of TYPE2 or nil otherwise."
- (let ((types (cons type1 type2)))
- (or (gethash types (comp-cstr-ctxt-subtype-p-mem comp-ctxt))
- (puthash types
- (memq type2 (comp-supertypes type1))
- (comp-cstr-ctxt-subtype-p-mem comp-ctxt)))))
-
(defun comp-union-typesets (&rest typesets)
"Union types present into TYPESETS."
(or (gethash typesets (comp-cstr-ctxt-union-typesets-mem comp-ctxt))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0d452d61d05: ; * lisp/emacs-lisp/comp-cstr.el (comp-subtype-p): Hoist above use.,
Mattias Engdegård <=