aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2023-04-13 14:08:28 +0200
committerMattias EngdegÄrd2023-04-13 14:26:31 +0200
commitdf4a6342fa439de49451f6c48c7bfe639e8a3d6e (patch)
tree47ba51276f207153435918d15ff29e3d2c3f0dbd
parentfeef1a0592d2f56bfae1718ae6f83f8f66393fb3 (diff)
downloademacs-df4a6342fa439de49451f6c48c7bfe639e8a3d6e.tar.gz
emacs-df4a6342fa439de49451f6c48c7bfe639e8a3d6e.zip
; reorder function effect-declaration lists
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns) (side-effect-and-error-free-fns, pure-fns): Group by file.
-rw-r--r--lisp/emacs-lisp/byte-opt.el464
1 files changed, 242 insertions, 222 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index f8ebbaabd95..2bdd3375728 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1636,200 +1636,231 @@ See Info node `(elisp) Integer Basics'."
1636 1636
1637;; I wonder if I missed any :-\) 1637;; I wonder if I missed any :-\)
1638(let ((side-effect-free-fns 1638(let ((side-effect-free-fns
1639 '(% * + - / /= 1+ 1- < <= = > >= abs acos 1639 '(
1640 active-minibuffer-window all-threads 1640 ;; alloc.c
1641 append aref ash asin atan 1641 make-bool-vector make-byte-code make-list make-record make-string
1642 assoc-string assq 1642 make-symbol make-vector
1643 bare-symbol 1643 ;; buffer.c
1644 base64-decode-string base64-encode-string base64url-encode-string
1645 bool-vector-count-consecutive bool-vector-count-population
1646 bool-vector-subsetp
1647 boundp
1648 buffer-base-buffer buffer-chars-modified-tick buffer-file-name 1644 buffer-base-buffer buffer-chars-modified-tick buffer-file-name
1649 buffer-local-value buffer-local-variables buffer-modified-p 1645 buffer-local-value buffer-local-variables buffer-modified-p
1650 buffer-modified-tick buffer-name buffer-substring 1646 buffer-modified-tick buffer-name get-buffer next-overlay-change
1651 buffer-substring-no-properties
1652 buffer-text-pixel-size
1653 byte-to-string byte-to-position
1654 capitalize car-less-than-car car category-docstring
1655 category-set-mnemonics cdr ceiling
1656 char-after char-before char-category-set char-equal
1657 char-syntax char-to-string char-width
1658 compare-buffer-substrings compare-strings
1659 concat condition-mutex condition-name
1660 controlling-tty-p coordinates-in-window-p
1661 copy-category-table copy-alist copy-hash-table copy-keymap
1662 copy-marker copy-sequence copy-syntax-table
1663 copysign cos
1664 current-bidi-paragraph-direction
1665 current-time-string current-time-zone
1666 decode-char
1667 decode-time default-boundp default-value
1668 directory-name-p
1669 documentation downcase
1670 elt encode-char exp expt encode-time error-message-string
1671 fboundp fceiling featurep ffloor
1672 file-directory-p file-exists-p file-locked-p file-name-absolute-p
1673 file-name-concat
1674 file-newer-than-file-p file-readable-p file-symlink-p file-writable-p
1675 float float-time floor
1676 format format-message format-network-address format-time-string
1677 frame-ancestor-p frame-bottom-divider-width
1678 frame-char-height frame-char-width
1679 frame-child-frame-border-width frame-internal-border-width
1680 frame-native-height frame-native-width frame-first-window frame-focus
1681 frame-fringe-width
1682 frame-parameters frame-parameter frame-parent
1683 frame-pointer-visible-p frame-position
1684 frame-right-divider-width
1685 frame-root-window frame-scale-factor
1686 frame-scroll-bar-height frame-scroll-bar-width
1687 frame-selected-window frame-terminal frame-text-cols frame-text-lines
1688 frame-text-height frame-text-width
1689 frame-total-cols frame-total-lines
1690 frame-visible-p frame-window-state-change
1691 fringe-bitmaps-at-pos
1692 fround ftruncate
1693 get gethash get-buffer get-buffer-process get-buffer-window
1694 get-char-property get-char-property-and-overlay
1695 get-display-property get-process
1696 get-text-property get-unused-category get-variable-watchers
1697 group-name
1698 hash-table-count hash-table-rehash-size hash-table-rehash-threshold
1699 hash-table-size hash-table-test hash-table-weakness
1700 indirect-variable innermost-minibuffer-p intern-soft invisible-p isnan
1701 keymap-parent keymap-prompt
1702 ldexp
1703 length length< length> length=
1704 line-beginning-position line-end-position
1705 line-number-at-pos line-pixel-height
1706 local-variable-if-set-p local-variable-p locale-info
1707 log logand logb logcount logior lognot logxor
1708 lookup-image-map
1709 make-bool-vector make-byte-code make-category-set make-char-table
1710 make-hash-table make-keymap make-list make-record make-sparse-keymap
1711 make-string make-symbol make-vector
1712 marker-buffer marker-insertion-type marker-position max
1713 match-beginning match-end
1714 matching-paren
1715 member memq memql min minibuffer-innermost-command-loop-p
1716 minibuffer-selected-window minibuffer-window minibufferp
1717 mod multibyte-char-to-unibyte mutex-name
1718 next-char-property-change next-frame next-overlay-change
1719 next-property-change next-single-char-property-change
1720 next-single-property-change
1721 next-window ngettext nth nthcdr number-to-string
1722 object-intervals
1723 overlay-buffer overlay-end overlay-get overlay-properties 1647 overlay-buffer overlay-end overlay-get overlay-properties
1724 overlay-start overlays-at overlays-in 1648 overlay-start overlays-at overlays-in previous-overlay-change
1725 posn-at-point posn-at-x-y position-symbol 1649 ;; callint.c
1726 pos-bol pos-eol 1650 prefix-numeric-value
1727 prefix-numeric-value 1651 ;; casefiddle.c
1728 previous-char-property-change previous-frame previous-overlay-change 1652 capitalize downcase upcase upcase-initials
1729 previous-property-change 1653 ;; category.c
1730 previous-single-char-property-change previous-single-property-change 1654 category-docstring category-set-mnemonics char-category-set
1731 previous-window 1655 copy-category-table get-unused-category make-category-set
1732 prin1-to-string 1656 ;; character.c
1657 char-width multibyte-char-to-unibyte string unibyte-char-to-multibyte
1658 ;; charset.c
1659 decode-char encode-char
1660 ;; chartab.c
1661 make-char-table
1662 ;; data.c
1663 % * + - / /= 1+ 1- < <= = > >=
1664 aref ash bare-symbol
1665 bool-vector-count-consecutive bool-vector-count-population
1666 bool-vector-subsetp
1667 boundp car cdr default-boundp default-value fboundp
1668 get-variable-watchers indirect-variable
1669 local-variable-if-set-p local-variable-p
1670 logand logcount logior lognot logxor max min mod
1671 number-to-string position-symbol string-to-number
1672 subr-arity subr-name subr-native-lambda-list subr-type
1673 symbol-function symbol-name symbol-plist symbol-value
1674 symbol-with-pos-pos variable-binding-locus
1675 ;; doc.c
1676 documentation
1677 ;; editfns.c
1678 buffer-substring buffer-substring-no-properties
1679 byte-to-position byte-to-string
1680 char-after char-before char-equal char-to-string
1681 compare-buffer-substrings
1682 format format-message
1683 group-name
1684 line-beginning-position line-end-position ngettext pos-bol pos-eol
1685 propertize region-beginning region-end string-to-char
1686 user-full-name user-login-name
1687 ;; fileio.c
1688 car-less-than-car directory-name-p file-directory-p file-exists-p
1689 file-name-absolute-p file-name-concat file-newer-than-file-p
1690 file-readable-p file-symlink-p file-writable-p
1691 ;; filelock.c
1692 file-locked-p
1693 ;; floatfns.c
1694 abs acos asin atan ceiling copysign cos exp expt fceiling ffloor
1695 float floor fround ftruncate isnan ldexp log logb round sin sqrt tan
1696 truncate
1697 ;; fns.c
1698 append assq
1699 base64-decode-string base64-encode-string base64url-encode-string
1700 compare-strings concat copy-alist copy-hash-table copy-sequence elt
1701 featurep get
1702 gethash hash-table-count hash-table-rehash-size
1703 hash-table-rehash-threshold hash-table-size hash-table-test
1704 hash-table-weakness
1705 length length< length= length>
1706 line-number-at-pos locale-info make-hash-table
1707 member memq memql nth nthcdr
1708 object-intervals rassoc rassq reverse
1709 string-as-multibyte string-as-unibyte string-bytes string-distance
1710 string-equal string-lessp string-make-multibyte string-make-unibyte
1711 string-search string-to-multibyte substring substring-no-properties
1712 sxhash-eq sxhash-eql sxhash-equal sxhash-equal-including-properties
1713 take vconcat
1714 ;; frame.c
1715 frame-ancestor-p frame-bottom-divider-width frame-char-height
1716 frame-char-width frame-child-frame-border-width frame-focus
1717 frame-fringe-width frame-internal-border-width frame-native-height
1718 frame-native-width frame-parameter frame-parameters frame-parent
1719 frame-pointer-visible-p frame-position frame-right-divider-width
1720 frame-scale-factor frame-scroll-bar-height frame-scroll-bar-width
1721 frame-text-cols frame-text-height frame-text-lines frame-text-width
1722 frame-total-cols frame-total-lines frame-visible-p
1723 frame-window-state-change next-frame previous-frame
1724 tool-bar-pixel-width window-system
1725 ;; fringe.c
1726 fringe-bitmaps-at-pos
1727 ;; keyboard.c
1728 posn-at-point posn-at-x-y
1729 ;; keymap.c
1730 copy-keymap keymap-parent keymap-prompt make-keymap make-sparse-keymap
1731 ;; lread.c
1732 intern-soft read-from-string
1733 ;; marker.c
1734 copy-marker marker-buffer marker-insertion-type marker-position
1735 ;; minibuf.c
1736 active-minibuffer-window assoc-string innermost-minibuffer-p
1737 minibuffer-innermost-command-loop-p minibufferp
1738 ;; print.c
1739 error-message-string prin1-to-string
1740 ;; process.c
1741 format-network-address get-buffer-process get-process
1733 process-buffer process-coding-system process-command process-filter 1742 process-buffer process-coding-system process-command process-filter
1734 process-id process-inherit-coding-system-flag 1743 process-id process-inherit-coding-system-flag process-mark
1735 process-mark process-name process-plist 1744 process-name process-plist process-query-on-exit-flag
1736 process-query-on-exit-flag process-running-child-p process-sentinel 1745 process-running-child-p process-sentinel process-thread
1737 process-thread process-tty-name process-type 1746 process-tty-name process-type
1738 propertize 1747 ;; search.c
1739 rassq rassoc read-from-string 1748 match-beginning match-end regexp-quote
1740 regexp-quote region-beginning region-end reverse round 1749 ;; sqlite.c
1741 sin
1742 sqlite-columns sqlite-more-p sqlite-version 1750 sqlite-columns sqlite-more-p sqlite-version
1743 sqrt string string-bytes string-distance string-equal string-lessp 1751 ;; syntax.c
1744 string-search string-to-char 1752 char-syntax copy-syntax-table matching-paren string-to-syntax
1745 string-to-number string-to-syntax subr-arity subr-name
1746 substring substring-no-properties
1747 sxhash-equal sxhash-eq sxhash-eql sxhash-equal-including-properties
1748 symbol-function symbol-name symbol-plist symbol-value
1749 symbol-with-pos-pos
1750 syntax-class-to-char 1753 syntax-class-to-char
1751 string-make-unibyte 1754 ;; term.c
1752 string-make-multibyte string-as-multibyte string-as-unibyte 1755 controlling-tty-p tty-display-color-cells tty-display-color-p
1753 string-to-multibyte 1756 tty-top-frame tty-type
1754 subr-native-lambda-list subr-type 1757 ;; terminal.c
1755 tab-bar-height 1758 frame-terminal terminal-list terminal-live-p terminal-name
1756 take tan
1757 terminal-list terminal-live-p terminal-name
1758 terminal-parameter terminal-parameters 1759 terminal-parameter terminal-parameters
1760 ;; textprop.c
1761 get-char-property get-char-property-and-overlay get-text-property
1762 next-char-property-change next-property-change
1763 next-single-char-property-change next-single-property-change
1764 previous-char-property-change previous-property-change
1765 previous-single-char-property-change previous-single-property-change
1759 text-properties-at text-property-any text-property-not-all 1766 text-properties-at text-property-any text-property-not-all
1760 thread-live-p thread-name 1767 ;; thread.c
1761 time-add time-convert time-equal-p time-less-p time-subtract 1768 all-threads condition-mutex condition-name mutex-name thread-live-p
1762 tool-bar-height tool-bar-pixel-width truncate 1769 thread-name
1763 tty-display-color-cells tty-display-color-p tty-top-frame tty-type 1770 ;; timefns.c
1764 unibyte-char-to-multibyte upcase upcase-initials user-full-name 1771 current-time-string current-time-zone decode-time encode-time
1765 user-login-name 1772 float-time format-time-string time-add time-convert time-equal-p
1766 variable-binding-locus vconcat 1773 time-less-p time-subtract
1767 window-at window-body-height 1774 ;; window.c
1768 window-body-width window-buffer window-dedicated-p window-display-table 1775 coordinates-in-window-p frame-first-window frame-root-window
1769 window-combination-limit window-configuration-equal-p window-frame 1776 frame-selected-window get-buffer-window minibuffer-selected-window
1770 window-fringes window-hscroll 1777 minibuffer-window next-window previous-window window-at
1771 window-left-child window-left-column window-margins window-minibuffer-p 1778 window-body-height window-body-width window-buffer
1772 window-next-buffers window-next-sibling window-new-normal 1779 window-combination-limit window-configuration-equal-p
1773 window-new-total window-normal-size window-parameter window-parameters 1780 window-dedicated-p window-display-table window-frame window-fringes
1774 window-parent window-point window-prev-buffers 1781 window-hscroll window-left-child window-left-column window-margins
1775 window-prev-sibling window-scroll-bars 1782 window-minibuffer-p window-new-normal window-new-total
1776 window-start window-system window-text-height 1783 window-next-buffers window-next-sibling window-normal-size
1777 window-text-pixel-size 1784 window-parameter window-parameters window-parent window-point
1778 window-top-child window-top-line 1785 window-prev-buffers window-prev-sibling window-scroll-bars
1779 window-total-height window-total-width window-use-time window-vscroll 1786 window-start window-text-height window-top-child window-top-line
1780 )) 1787 window-total-height window-total-width window-use-time window-vscroll
1788 ;; xdisp.c
1789 buffer-text-pixel-size current-bidi-paragraph-direction
1790 get-display-property invisible-p line-pixel-height lookup-image-map
1791 tab-bar-height tool-bar-height window-text-pixel-size
1792 ))
1781 (side-effect-and-error-free-fns 1793 (side-effect-and-error-free-fns
1782 '(arrayp atom 1794 '(
1783 bare-symbol-p bobp bolp bool-vector bool-vector-p 1795 ;; alloc.c
1784 buffer-list buffer-live-p buffer-size buffer-string bufferp 1796 bool-vector cons list make-marker purecopy record vector
1785 byte-code-function-p byteorder 1797 ;; buffer.c
1786 car-safe case-table-p category-table category-table-p cdr-safe 1798 buffer-list buffer-live-p current-buffer overlay-lists overlayp
1787 char-or-string-p char-table-p characterp 1799 ;; casetab.c
1788 charsetp commandp condition-variable-p cons consp 1800 case-table-p current-case-table standard-case-table
1789 current-buffer current-case-table current-column current-global-map 1801 ;; category.c
1790 current-idle-time current-indentation current-input-mode 1802 category-table category-table-p make-category-table
1791 current-local-map current-message current-minor-mode-maps 1803 standard-category-table
1792 current-thread current-time 1804 ;; character.c
1805 characterp max-char
1806 ;; charset.c
1807 charsetp
1808 ;; data.c
1809 arrayp atom bare-symbol-p bool-vector-p bufferp byte-code-function-p
1810 byteorder car-safe cdr-safe char-or-string-p char-table-p
1811 condition-variable-p consp eq floatp indirect-function
1812 integer-or-marker-p integerp keywordp listp markerp
1813 module-function-p multibyte-string-p mutexp natnump nlistp null
1814 number-or-marker-p numberp recordp remove-pos-from-symbol
1815 sequencep stringp subr-native-elisp-p subrp symbol-with-pos-p symbolp
1816 threadp type-of user-ptrp vector-or-char-table-p vectorp wholenump
1817 ;; editfns.c
1818 bobp bolp buffer-size buffer-string current-message emacs-pid
1819 eobp eolp following-char gap-position gap-size group-gid
1820 group-real-gid mark-marker point point-marker point-max point-min
1821 position-bytes preceding-char system-name
1822 user-real-login-name user-real-uid user-uid
1823 ;; emacs.c
1824 invocation-directory invocation-name
1825 ;; eval.c
1826 commandp functionp
1827 ;; fileio.c
1793 default-file-modes 1828 default-file-modes
1794 emacs-pid eobp eolp eq equal eql 1829 ;; fns.c
1795 floatp following-char 1830 eql equal hash-table-p identity proper-list-p safe-length
1796 frame-list frame-live-p framep functionp 1831 secure-hash-algorithms
1797 gap-position gap-size 1832 ;; frame.c
1798 group-gid group-real-gid 1833 frame-list frame-live-p framep last-nonminibuffer-frame
1799 hash-table-p 1834 old-selected-frame selected-frame visible-frame-list
1800 identity imagep indirect-function integerp integer-or-marker-p 1835 ;; image.c
1801 invocation-directory invocation-name 1836 imagep
1802 keymapp keywordp 1837 ;; indent.c
1803 last-nonminibuffer-frame list listp 1838 current-column current-indentation
1804 long-line-optimizations-p 1839 ;; keyboard.c
1805 make-category-table make-marker mark-marker markerp max-char 1840 current-idle-time current-input-mode recent-keys recursion-depth
1806 minibuffer-contents minibuffer-contents-no-properties 1841 this-command-keys this-command-keys-vector this-single-command-keys
1807 minibuffer-depth minibuffer-prompt minibuffer-prompt-end 1842 this-single-command-raw-keys
1808 module-function-p multibyte-string-p mutexp 1843 ;; keymap.c
1809 natnump nlistp null number-or-marker-p numberp 1844 current-global-map current-local-map current-minor-mode-maps keymapp
1810 old-selected-frame overlay-lists overlayp 1845 ;; minibuf.c
1811 point point-marker point-min point-max position-bytes 1846 minibuffer-contents minibuffer-contents-no-properties minibuffer-depth
1812 preceding-char 1847 minibuffer-prompt minibuffer-prompt-end
1813 processp process-list 1848 ;; process.c
1814 proper-list-p purecopy 1849 process-list processp signal-names waiting-for-user-input-p
1815 recent-keys record recordp recursion-depth 1850 ;; sqlite.c
1816 remove-pos-from-symbol
1817 safe-length secure-hash-algorithms
1818 selected-frame selected-window sequencep signal-names
1819 sqlite-available-p sqlitep 1851 sqlite-available-p sqlitep
1820 standard-case-table standard-category-table standard-syntax-table 1852 ;; syntax.c
1821 stringp 1853 standard-syntax-table syntax-table syntax-table-p
1822 subr-native-elisp-p subrp 1854 ;; thread.c
1823 symbol-with-pos-p symbolp 1855 current-thread
1824 syntax-table syntax-table-p system-name 1856 ;; timefns.c
1825 this-command-keys this-command-keys-vector this-single-command-keys 1857 current-time
1826 this-single-command-raw-keys threadp type-of 1858 ;; window.c
1827 user-ptrp 1859 selected-window window-configuration-p window-live-p window-valid-p
1828 user-real-login-name user-real-uid user-uid 1860 windowp
1829 vector vector-or-char-table-p vectorp visible-frame-list 1861 ;; xdisp.c
1830 waiting-for-user-input-p 1862 long-line-optimizations-p
1831 wholenump window-configuration-p window-live-p 1863 )))
1832 window-valid-p windowp)))
1833 (while side-effect-free-fns 1864 (while side-effect-free-fns
1834 (put (car side-effect-free-fns) 'side-effect-free t) 1865 (put (car side-effect-free-fns) 'side-effect-free t)
1835 (setq side-effect-free-fns (cdr side-effect-free-fns))) 1866 (setq side-effect-free-fns (cdr side-effect-free-fns)))
@@ -1854,45 +1885,34 @@ See Info node `(elisp) Integer Basics'."
1854;; values if a marker is moved. 1885;; values if a marker is moved.
1855 1886
1856(let ((pure-fns 1887(let ((pure-fns
1857 '(concat regexp-quote 1888 '(
1858 string-to-char string-to-syntax symbol-name 1889 ;; character.c
1859 eq eql 1890 characterp
1860 = /= < <= >= > min max 1891 ;; data.c
1861 + - * / % mod abs ash 1+ 1- sqrt 1892 % * + - / /= 1+ 1- < <= = > >= aref arrayp ash atom bare-symbol
1862 logand logior lognot logxor logcount 1893 bool-vector-count-consecutive bool-vector-count-population
1863 copysign isnan ldexp float logb 1894 bool-vector-p bool-vector-subsetp
1864 floor ceiling round truncate 1895 bufferp car car-safe cdr cdr-safe char-or-string-p char-table-p
1865 ffloor fceiling fround ftruncate 1896 condition-variable-p consp eq floatp integer-or-marker-p integerp
1866 string-equal string-lessp 1897 keywordp listp logand logcount logior lognot logxor markerp max min
1867 string-search 1898 mod multibyte-string-p mutexp natnump nlistp null number-or-marker-p
1868 consp atom listp nlistp proper-list-p 1899 numberp recordp remove-pos-from-symbol sequencep stringp symbol-name
1869 sequencep arrayp vectorp stringp bool-vector-p hash-table-p recordp 1900 symbolp threadp type-of vector-or-char-table-p vectorp
1870 multibyte-string-p char-table-p vector-or-char-table-p 1901 ;; editfns.c
1871 threadp mutexp condition-variable-p 1902 string-to-char
1872 null 1903 ;; floatfns.c
1873 numberp integerp floatp natnump characterp 1904 abs ceiling copysign fceiling ffloor float floor fround ftruncate
1874 integer-or-marker-p number-or-marker-p char-or-string-p 1905 isnan ldexp logb round sqrt truncate
1875 symbolp keywordp bufferp markerp 1906 ;; fns.c
1876 bare-symbol remove-pos-from-symbol 1907 assq base64-decode-string base64-encode-string base64url-encode-string
1877 type-of 1908 concat elt eql equal hash-table-p identity length length< length=
1878 identity 1909 length> member memq memql nth nthcdr proper-list-p rassoc rassq
1879 1910 safe-length string-bytes string-distance string-equal string-lessp
1880 ;; The following functions are pure up to mutation of their 1911 string-search take
1881 ;; arguments. This is pure enough for the purposes of 1912 ;; search.c
1882 ;; constant folding, but not necessarily for all kinds of 1913 regexp-quote
1883 ;; code motion. 1914 ;; syntax.c
1884 car cdr car-safe cdr-safe nth nthcdr take 1915 string-to-syntax
1885 equal
1886 length safe-length
1887 memq memql member
1888 ;; `assoc' and `assoc-default' are excluded since they are
1889 ;; impure if the test function is (consider `string-match').
1890 assq rassq rassoc
1891 aref elt
1892 length< length> length= string-bytes string-distance
1893 base64-decode-string base64-encode-string base64url-encode-string
1894 bool-vector-subsetp
1895 bool-vector-count-population bool-vector-count-consecutive
1896 ))) 1916 )))
1897 (while pure-fns 1917 (while pure-fns
1898 (put (car pure-fns) 'pure t) 1918 (put (car pure-fns) 'pure t)