diff options
| author | Richard M. Stallman | 2002-07-25 18:18:10 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-07-25 18:18:10 +0000 |
| commit | 1fd592a0b06e5cb42f8e35135fbf384e1fd3d983 (patch) | |
| tree | ba4d819d6bee018bb5e8c6f2873c8fc3cf8f94c6 | |
| parent | 94534262c53e8602d72289aca8bef1d0685046a6 (diff) | |
| download | emacs-1fd592a0b06e5cb42f8e35135fbf384e1fd3d983.tar.gz emacs-1fd592a0b06e5cb42f8e35135fbf384e1fd3d983.zip | |
(byte-compile-set-symbol-position): Don't recompute `entry' on each iteration.
(byte-compile-delete-first): Make it defsubst.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index a8cc1400fdb..936f9fec5cf 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | ;;; This version incorporates changes up to version 2.10 of the | 11 | ;;; This version incorporates changes up to version 2.10 of the |
| 12 | ;;; Zawinski-Furuseth compiler. | 12 | ;;; Zawinski-Furuseth compiler. |
| 13 | (defconst byte-compile-version "$Revision: 2.106 $") | 13 | (defconst byte-compile-version "$Revision: 2.107 $") |
| 14 | 14 | ||
| 15 | ;; This file is part of GNU Emacs. | 15 | ;; This file is part of GNU Emacs. |
| 16 | 16 | ||
| @@ -848,7 +848,7 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." | |||
| 848 | "Last known character position in the input.") | 848 | "Last known character position in the input.") |
| 849 | 849 | ||
| 850 | ;; copied from gnus-util.el | 850 | ;; copied from gnus-util.el |
| 851 | (defun byte-compile-delete-first (elt list) | 851 | (defsubst byte-compile-delete-first (elt list) |
| 852 | (if (eq (car list) elt) | 852 | (if (eq (car list) elt) |
| 853 | (cdr list) | 853 | (cdr list) |
| 854 | (let ((total list)) | 854 | (let ((total list)) |
| @@ -872,18 +872,16 @@ Each function's symbol gets marked with the `byte-compile-noruntime' property." | |||
| 872 | ;; gross hack? And the answer, of course, would be yes. | 872 | ;; gross hack? And the answer, of course, would be yes. |
| 873 | (defun byte-compile-set-symbol-position (sym &optional allow-previous) | 873 | (defun byte-compile-set-symbol-position (sym &optional allow-previous) |
| 874 | (when byte-compile-read-position | 874 | (when byte-compile-read-position |
| 875 | (let ((last nil)) | 875 | (let (last entry) |
| 876 | (while (progn | 876 | (while (progn |
| 877 | (setq last byte-compile-last-position) | 877 | (setq last byte-compile-last-position |
| 878 | (let* ((entry (assq sym read-symbol-positions-list)) | 878 | entry (assq sym read-symbol-positions-list)) |
| 879 | (cur (cdr entry))) | 879 | (when entry |
| 880 | (setq byte-compile-last-position | 880 | (setq byte-compile-last-position |
| 881 | (if cur | 881 | (+ byte-compile-read-position (cdr entry)) |
| 882 | (+ byte-compile-read-position cur) | 882 | read-symbol-positions-list |
| 883 | last)) | 883 | (byte-compile-delete-first |
| 884 | (setq | 884 | entry read-symbol-positions-list))) |
| 885 | read-symbol-positions-list | ||
| 886 | (byte-compile-delete-first entry read-symbol-positions-list))) | ||
| 887 | (or (and allow-previous (not (= last byte-compile-last-position))) | 885 | (or (and allow-previous (not (= last byte-compile-last-position))) |
| 888 | (> last byte-compile-last-position))))))) | 886 | (> last byte-compile-last-position))))))) |
| 889 | 887 | ||