Commit 0d452d61 authored by Mattias Engdegård's avatar Mattias Engdegård
Browse files

; * lisp/emacs-lisp/comp-cstr.el (comp-subtype-p): Hoist above use.

parent ecc88709
Pipeline #26990 failed with stages
in 170 minutes and 58 seconds
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment