emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp aced2cf 2/6: * Add a number of type specifiers for p


From: Andrea Corallo
Subject: feature/native-comp aced2cf 2/6: * Add a number of type specifiers for pure function
Date: Sat, 14 Nov 2020 16:07:30 -0500 (EST)

branch: feature/native-comp
commit aced2cf6ac50d3c62380c224c7d553f597c1f574
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * Add a number of type specifiers for pure function
    
        * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Add 60
        pure function type specifiers.
---
 lisp/emacs-lisp/comp.el | 48 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 96b2b29..fa94d39 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -191,6 +191,7 @@ For internal use only by the testsuite.")
 Each function in FUNCTIONS is run after PASS.
 Useful to hook into pass checkers.")
 
+;; FIXME this probably should not be here but... good for now.
 (defconst comp-known-type-specifiers
   `((cons (function (t t) cons))
     (1+ (function ((or number marker)) number))
@@ -199,7 +200,52 @@ Useful to hook into pass checkers.")
     (- (function (&rest (or number marker)) number))
     (* (function (&rest (or number marker)) number))
     (/ (function ((or number marker) &rest (or number marker)) number))
-    (% (function ((or number marker) (or number marker)) number)))
+    (% (function ((or number marker) (or number marker)) number))
+    (concat (function (&rest sequence) string))
+    (regexp-opt (function (list) string))
+    (string-to-char (function (string) integer))
+    (symbol-name (function (symbol) string))
+    (eq (function (t t) boolean))
+    (eql (function (t t) boolean))
+    (= (function ((or number marker) (or number marker)) boolean))
+    (/= (function ((or number marker) (or number marker)) boolean))
+    (< (function ((or number marker) &rest (or number marker)) boolean))
+    (<= (function ((or number marker) &rest (or number marker)) boolean))
+    (>= (function ((or number marker) &rest (or number marker)) boolean))
+    (> (function ((or number marker) &rest (or number marker)) boolean))
+    (min (function ((or number marker) &rest (or number marker)) number))
+    (max (function ((or number marker) &rest (or number marker)) number))
+    (mod (function ((or number marker) (or number marker))
+                   (or (integer 0 *) (float 0 *))))
+    (abs (function (number) number))
+    (ash (function (integer integer) integer))
+    (sqrt (function (number) float))
+    (logand (function (&rest (or integer marker)) integer))
+    (logior (function (&rest (or integer marker)) integer))
+    (lognot (function (integer) integer))
+    (logxor (function (&rest (or integer marker)) integer))
+    (logcount (function (integer) integer))
+    (copysign (function (float float) float))
+    (isnan (function (float) boolean))
+    (ldexp (function (number integer) float))
+    (float (function (number) float))
+    (logb (function (number) integer))
+    (floor (function (number &optional number) integer))
+    (ceiling (function (number &optional number) integer))
+    (round (function (number &optional number) integer))
+    (truncate (function (number &optional number) integer))
+    (ffloor (function (float) float))
+    (fceiling (function (float) float))
+    (fround (function (float) float))
+    (ftruncate (function (float) float))
+    (string= (function ((or string symbol) (or string symbol)) boolean))
+    (string-equal (function ((or string symbol) (or string symbol)) boolean))
+    (string< (function ((or string symbol) (or string symbol)) boolean))
+    (string-lessp (function ((or string symbol) (or string symbol)) boolean))
+    (string-search (function (string string) (or integer null)))
+    ;; Type hints
+    (comp-hint-fixnum (function (t) fixnum))
+    (comp-hint-cons (function (t) cons)))
   "Alist used for type propagation.")
 
 (defconst comp-symbol-values-optimizable '(most-positive-fixnum



reply via email to

[Prev in Thread] Current Thread [Next in Thread]