diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-11-14 16:55:39 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-11-14 22:06:31 +0100 |
commit | aced2cf6ac50d3c62380c224c7d553f597c1f574 (patch) | |
tree | 002cd6d7edf59c4f5cc437b444f7dee3dd446556 /lisp/emacs-lisp | |
parent | a467fa5c499c5808c6886d0d71640c1352498db8 (diff) | |
download | emacs-aced2cf6ac50d3c62380c224c7d553f597c1f574.tar.gz emacs-aced2cf6ac50d3c62380c224c7d553f597c1f574.tar.bz2 emacs-aced2cf6ac50d3c62380c224c7d553f597c1f574.zip |
* Add a number of type specifiers for pure function
* lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Add 60
pure function type specifiers.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 96b2b29043a..fa94d399eb5 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 |