]> git.eshelyaron.com Git - emacs.git/commitdiff
rework predicates to be homogeneous
authorAndrea Corallo <akrl@sdf.org>
Mon, 30 Dec 2019 23:20:35 +0000 (00:20 +0100)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:38:18 +0000 (11:38 +0100)
lisp/emacs-lisp/comp.el

index 039cd6cd4114c3e0da3e98db86bf0b124de55a85..de3b28e438cc05c4317b17953629b15ef4dcb799 100644 (file)
@@ -296,22 +296,21 @@ structure.")
 
 \f
 
-(defun comp-set-op-p (op)
+(defsubst comp-set-op-p (op)
   "Assignment predicate for OP."
-  (cl-find op comp-limple-sets))
+  (when (member op comp-limple-sets) t))
 
-(defun comp-assign-op-p (op)
+(defsubst comp-assign-op-p (op)
   "Assignment predicate for OP."
-  (cl-find op comp-limple-assignments))
+  (when (member op comp-limple-assignments) t))
 
-(defun comp-limple-insn-call-p (insn)
+(defsubst comp-limple-insn-call-p (insn)
   "Limple INSN call predicate."
-  (when (member (car-safe insn) comp-limple-calls)
-    t))
+  (when (member (car-safe insn) comp-limple-calls) t))
 
-(defun comp-type-hint-p (func)
+(defsubst comp-type-hint-p (func)
   "Type hint predicate for function name FUNC."
-  (member func comp-type-hints))
+  (when (member func comp-type-hints) t))
 
 (defun comp-add-const-to-relocs (obj)
   "Keep track of OBJ into the ctxt relocations.