comparison lisp/ChangeLog @ 5366:f00192e1cd49

Examining the result of #'length: `eql', not `=', it's better style & cheaper 2011-03-08 Aidan Kehoe <kehoea@parhasard.net> * buff-menu.el (list-buffers-noselect): * byte-optimize.el (byte-optimize-identity): * byte-optimize.el (byte-optimize-if): * byte-optimize.el (byte-optimize-nth): * byte-optimize.el (byte-optimize-nthcdr): * bytecomp.el (byte-compile-warn-wrong-args): * bytecomp.el (byte-compile-two-args-19->20): * bytecomp.el (byte-compile-list): * bytecomp.el (byte-compile-beginning-of-line): * bytecomp.el (byte-compile-set): * bytecomp.el (byte-compile-set-default): * bytecomp.el (byte-compile-values): * bytecomp.el (byte-compile-values-list): * bytecomp.el (byte-compile-integerp): * bytecomp.el (byte-compile-multiple-value-list-internal): * bytecomp.el (byte-compile-throw): * cl-macs.el (cl-do-arglist): * cl-macs.el (cl-parse-loop-clause): * cl-macs.el (multiple-value-bind): * cl-macs.el (multiple-value-setq): * cl-macs.el (get-setf-method): * cmdloop.el (command-error): * cmdloop.el (y-or-n-p-minibuf): * cmdloop.el (yes-or-no-p-minibuf): * coding.el (unencodable-char-position): * cus-edit.el (custom-face-prompt): * cus-edit.el (custom-buffer-create-internal): * cus-edit.el (widget-face-action): * cus-edit.el (custom-group-value-create): * descr-text.el (describe-char-unicode-data): * dialog-gtk.el (popup-builtin-question-dialog): * dragdrop.el (experimental-dragdrop-drop-log-function): * dragdrop.el (experimental-dragdrop-drop-mime-default): * easymenu.el (easy-menu-add): * easymenu.el (easy-menu-remove): * faces.el (read-face-name): * faces.el (set-face-stipple): * files.el (file-name-non-special): * font.el (font-combine-fonts): * font.el (font-set-face-font): * font.el (font-parse-rgb-components): * font.el (font-rgb-color-p): * font.el (font-color-rgb-components): * gnuserv.el (gnuserv-edit-files): * help.el (key-or-menu-binding): * help.el (function-documentation-1): * help.el (function-documentation): * info.el (info): * isearch-mode.el (isearch-exit): * isearch-mode.el (isearch-edit-string): * isearch-mode.el (isearch-*-char): * isearch-mode.el (isearch-complete1): * ldap.el (ldap-encode-country-string): * ldap.el (ldap-decode-string): * minibuf.el (read-file-name-internal-1): * minibuf.el (read-non-nil-coding-system): * minibuf.el (get-user-response): * mouse.el (drag-window-divider): * mule/ccl.el: * mule/ccl.el (ccl-compile-if): * mule/ccl.el (ccl-compile-break): * mule/ccl.el (ccl-compile-repeat): * mule/ccl.el (ccl-compile-write-repeat): * mule/ccl.el (ccl-compile-call): * mule/ccl.el (ccl-compile-end): * mule/ccl.el (ccl-compile-read-multibyte-character): * mule/ccl.el (ccl-compile-write-multibyte-character): * mule/ccl.el (ccl-compile-translate-character): * mule/ccl.el (ccl-compile-mule-to-unicode): * mule/ccl.el (ccl-compile-unicode-to-mule): * mule/ccl.el (ccl-compile-lookup-integer): * mule/ccl.el (ccl-compile-lookup-character): * mule/ccl.el (ccl-compile-map-multiple): * mule/ccl.el (ccl-compile-map-single): * mule/devan-util.el (devanagari-compose-to-one-glyph): * mule/devan-util.el (devanagari-composition-component): * mule/mule-cmds.el (finish-set-language-environment): * mule/viet-util.el: * mule/viet-util.el (viet-encode-viscii-char): * multicast.el (open-multicast-group): * newcomment.el (comment-quote-nested): * newcomment.el (comment-region): * newcomment.el (comment-dwim): * regexp-opt.el (regexp-opt-group): * replace.el (map-query-replace-regexp): * specifier.el (derive-device-type-from-tag-set): * subr.el (skip-chars-quote): * test-harness.el (test-harness-from-buffer): * test-harness.el (batch-test-emacs): * wid-edit.el (widget-choice-action): * wid-edit.el (widget-symbol-prompt-internal): * wid-edit.el (widget-color-action): * window-xemacs.el (push-window-configuration): * window-xemacs.el (pop-window-configuration): * window.el (quit-window): * x-compose.el (electric-diacritic): It's better style, and cheaper (often one assembler instruction vs. a C funcall in the byte code), to use `eql' instead of `=' when it's clear what numerical type a given result will be. Change much of our code to do this, with the help of a byte-compiler change (not comitted) that looked for calls to #'length (which always returns an integer) in its args.
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 08 Mar 2011 23:41:52 +0000
parents dbae25a8949d
children 8b70d37ab80e
comparison
equal deleted inserted replaced
5365:dbae25a8949d 5366:f00192e1cd49
1 2011-03-08 Aidan Kehoe <kehoea@parhasard.net>
2
3 * buff-menu.el (list-buffers-noselect):
4 * byte-optimize.el (byte-optimize-identity):
5 * byte-optimize.el (byte-optimize-if):
6 * byte-optimize.el (byte-optimize-nth):
7 * byte-optimize.el (byte-optimize-nthcdr):
8 * bytecomp.el (byte-compile-warn-wrong-args):
9 * bytecomp.el (byte-compile-two-args-19->20):
10 * bytecomp.el (byte-compile-list):
11 * bytecomp.el (byte-compile-beginning-of-line):
12 * bytecomp.el (byte-compile-set):
13 * bytecomp.el (byte-compile-set-default):
14 * bytecomp.el (byte-compile-values):
15 * bytecomp.el (byte-compile-values-list):
16 * bytecomp.el (byte-compile-integerp):
17 * bytecomp.el (byte-compile-multiple-value-list-internal):
18 * bytecomp.el (byte-compile-throw):
19 * cl-macs.el (cl-do-arglist):
20 * cl-macs.el (cl-parse-loop-clause):
21 * cl-macs.el (multiple-value-bind):
22 * cl-macs.el (multiple-value-setq):
23 * cl-macs.el (get-setf-method):
24 * cmdloop.el (command-error):
25 * cmdloop.el (y-or-n-p-minibuf):
26 * cmdloop.el (yes-or-no-p-minibuf):
27 * coding.el (unencodable-char-position):
28 * cus-edit.el (custom-face-prompt):
29 * cus-edit.el (custom-buffer-create-internal):
30 * cus-edit.el (widget-face-action):
31 * cus-edit.el (custom-group-value-create):
32 * descr-text.el (describe-char-unicode-data):
33 * dialog-gtk.el (popup-builtin-question-dialog):
34 * dragdrop.el (experimental-dragdrop-drop-log-function):
35 * dragdrop.el (experimental-dragdrop-drop-mime-default):
36 * easymenu.el (easy-menu-add):
37 * easymenu.el (easy-menu-remove):
38 * faces.el (read-face-name):
39 * faces.el (set-face-stipple):
40 * files.el (file-name-non-special):
41 * font.el (font-combine-fonts):
42 * font.el (font-set-face-font):
43 * font.el (font-parse-rgb-components):
44 * font.el (font-rgb-color-p):
45 * font.el (font-color-rgb-components):
46 * gnuserv.el (gnuserv-edit-files):
47 * help.el (key-or-menu-binding):
48 * help.el (function-documentation-1):
49 * help.el (function-documentation):
50 * info.el (info):
51 * isearch-mode.el (isearch-exit):
52 * isearch-mode.el (isearch-edit-string):
53 * isearch-mode.el (isearch-*-char):
54 * isearch-mode.el (isearch-complete1):
55 * ldap.el (ldap-encode-country-string):
56 * ldap.el (ldap-decode-string):
57 * minibuf.el (read-file-name-internal-1):
58 * minibuf.el (read-non-nil-coding-system):
59 * minibuf.el (get-user-response):
60 * mouse.el (drag-window-divider):
61 * mule/ccl.el:
62 * mule/ccl.el (ccl-compile-if):
63 * mule/ccl.el (ccl-compile-break):
64 * mule/ccl.el (ccl-compile-repeat):
65 * mule/ccl.el (ccl-compile-write-repeat):
66 * mule/ccl.el (ccl-compile-call):
67 * mule/ccl.el (ccl-compile-end):
68 * mule/ccl.el (ccl-compile-read-multibyte-character):
69 * mule/ccl.el (ccl-compile-write-multibyte-character):
70 * mule/ccl.el (ccl-compile-translate-character):
71 * mule/ccl.el (ccl-compile-mule-to-unicode):
72 * mule/ccl.el (ccl-compile-unicode-to-mule):
73 * mule/ccl.el (ccl-compile-lookup-integer):
74 * mule/ccl.el (ccl-compile-lookup-character):
75 * mule/ccl.el (ccl-compile-map-multiple):
76 * mule/ccl.el (ccl-compile-map-single):
77 * mule/devan-util.el (devanagari-compose-to-one-glyph):
78 * mule/devan-util.el (devanagari-composition-component):
79 * mule/mule-cmds.el (finish-set-language-environment):
80 * mule/viet-util.el:
81 * mule/viet-util.el (viet-encode-viscii-char):
82 * multicast.el (open-multicast-group):
83 * newcomment.el (comment-quote-nested):
84 * newcomment.el (comment-region):
85 * newcomment.el (comment-dwim):
86 * regexp-opt.el (regexp-opt-group):
87 * replace.el (map-query-replace-regexp):
88 * specifier.el (derive-device-type-from-tag-set):
89 * subr.el (skip-chars-quote):
90 * test-harness.el (test-harness-from-buffer):
91 * test-harness.el (batch-test-emacs):
92 * wid-edit.el (widget-choice-action):
93 * wid-edit.el (widget-symbol-prompt-internal):
94 * wid-edit.el (widget-color-action):
95 * window-xemacs.el (push-window-configuration):
96 * window-xemacs.el (pop-window-configuration):
97 * window.el (quit-window):
98 * x-compose.el (electric-diacritic):
99 It's better style, and cheaper (often one assembler instruction
100 vs. a C funcall in the byte code), to use `eql' instead of `='
101 when it's clear what numerical type a given result will be. Change
102 much of our code to do this, with the help of a byte-compiler
103 change (not comitted) that looked for calls to #'length (which
104 always returns an integer) in its args.
105
1 2011-03-08 Aidan Kehoe <kehoea@parhasard.net> 106 2011-03-08 Aidan Kehoe <kehoea@parhasard.net>
2 107
3 * format.el (format-delq-cons): Removed. 108 * format.el (format-delq-cons): Removed.
4 * format.el (format-make-relatively-unique): Removed. 109 * format.el (format-make-relatively-unique): Removed.
5 * format.el (format-common-tail): Removed. 110 * format.el (format-common-tail): Removed.