[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 9361c83318 2/2: More non-nil-returning functions in source optimi
From: |
Mattias Engdegård |
Subject: |
master 9361c83318 2/2: More non-nil-returning functions in source optimisation |
Date: |
Thu, 18 Aug 2022 11:10:59 -0400 (EDT) |
branch: master
commit 9361c833182e47607099f7ffb5dc68a53de26792
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
More non-nil-returning functions in source optimisation
This change was partially generated and mechanically cross-validated
with function type information from comp-known-type-specifiers in
comp.el.
* lisp/emacs-lisp/byte-opt.el (byte-compile-trueconstp):
Extend list of functions and fix a typo (logxor).
---
lisp/emacs-lisp/byte-opt.el | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index bbe8135f04..1751669445 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -753,22 +753,41 @@ for speeding up processing.")
((memq head
;; FIXME: Replace this list with a function property?
'( length safe-length cons lambda
- string make-string format concat
+ string unibyte-string make-string concat
+ format format-message
substring substring-no-properties string-replace
replace-regexp-in-string symbol-name make-symbol
+ compare-strings
mapconcat
vector make-vector vconcat make-record record
regexp-quote regexp-opt
buffer-string buffer-substring
buffer-substring-no-properties
current-buffer buffer-size
- point point-min point-max
+ point point-min point-max buffer-end count-lines
following-char preceding-char max-char
- + - * / % 1+ 1- min max abs
- logand logior lorxor lognot ash
+ region-beginning region-end
+ line-beginning-position line-end-position
+ + - * / % 1+ 1- min max abs mod expt logb
+ logand logior logxor lognot ash logcount
+ floor ceiling round truncate
+ sqrt sin cos tan asin acos atan exp log copysign
+ ffloor fceiling fround ftruncate float
+ ldexp frexp
number-to-string string-to-number
- int-to-string char-to-string prin1-to-string
+ int-to-string char-to-string
+ prin1-to-string read-from-string
byte-to-string string-to-vector string-to-char
+ capitalize upcase downcase
+ propertize
+ string-as-multibyte string-as-unibyte
+ string-to-multibyte string-to-unibyte
+ string-make-multibyte string-make-unibyte
+ make-hash-table hash-table-count
+ unibyte-char-to-multibyte multibyte-char-to-unibyte
+ sxhash sxhash-equal sxhash-eq sxhash-eql
+ sxhash-equal-including-properties
+ make-marker copy-marker point-marker mark-marker
always))
t)
((eq head 'if)