summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-08-18 12:33:40 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-08-18 17:10:46 +0200
commit9361c833182e47607099f7ffb5dc68a53de26792 (patch)
tree4ea7ea612898569914c8ee38a881876443fd6d5e /lisp/emacs-lisp
parentf33a429a53ea2647199804f12e16c65768d526d5 (diff)
downloademacs-9361c833182e47607099f7ffb5dc68a53de26792.tar.gz
emacs-9361c833182e47607099f7ffb5dc68a53de26792.tar.bz2
emacs-9361c833182e47607099f7ffb5dc68a53de26792.zip
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).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/byte-opt.el29
1 files changed, 24 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index bbe8135f04a..1751669445a 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)