diff options
| author | Richard M. Stallman | 1996-09-10 19:22:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-10 19:22:12 +0000 |
| commit | 469414a00a4e38dea900fd07a3a665283a4a093a (patch) | |
| tree | 0a13e830776dcdaace8909b1d29d1af9098ab9f3 | |
| parent | 32c1a22e20683851226911a8608f150fd4cb0532 (diff) | |
| download | emacs-469414a00a4e38dea900fd07a3a665283a4a093a.tar.gz emacs-469414a00a4e38dea900fd07a3a665283a4a093a.zip | |
(byte-compile-out-toplevel): Undo previous change.
(byte-compile-byte-code-maker): Undo previous change.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 56 |
1 files changed, 9 insertions, 47 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index d2a22915067..e38a2dc0071 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.16 $") | 13 | (defconst byte-compile-version "$Revision: 2.17 $") |
| 14 | 14 | ||
| 15 | ;; This file is part of GNU Emacs. | 15 | ;; This file is part of GNU Emacs. |
| 16 | 16 | ||
| @@ -1846,38 +1846,7 @@ If FORM is a lambda or a macro, byte-compile it as a function." | |||
| 1846 | ((atom fun) ; compiled function. | 1846 | ((atom fun) ; compiled function. |
| 1847 | ;; generate-emacs19-bytecodes must be on, otherwise byte-compile-lambda | 1847 | ;; generate-emacs19-bytecodes must be on, otherwise byte-compile-lambda |
| 1848 | ;; would have produced a lambda. | 1848 | ;; would have produced a lambda. |
| 1849 | (let ((const-vector (aref fun 2)) | 1849 | fun) |
| 1850 | (i 0) | ||
| 1851 | (uninterned nil)) | ||
| 1852 | ;; Find all the uninterned symbols that appear | ||
| 1853 | ;; as constants in this function. | ||
| 1854 | (while (< i (length const-vector)) | ||
| 1855 | (and (symbolp (aref const-vector i)) | ||
| 1856 | (not (eq (aref const-vector i) | ||
| 1857 | (intern-soft (symbol-name (aref const-vector i))))) | ||
| 1858 | (setq uninterned (cons i uninterned))) | ||
| 1859 | (setq i (1+ i))) | ||
| 1860 | ;; Arrange to regenrate the uninterned symbols | ||
| 1861 | ;; when we read in this code to produce the compiled function. | ||
| 1862 | (if uninterned | ||
| 1863 | (let (modifiers) | ||
| 1864 | (while uninterned | ||
| 1865 | (let ((symbol (aref const-vector (car uninterned))) | ||
| 1866 | fixup) | ||
| 1867 | (setq fixup | ||
| 1868 | ;; Some uninterned symbols specify how to | ||
| 1869 | ;; regenerate them. | ||
| 1870 | (if (get symbol 'byte-compile-regenerate) | ||
| 1871 | `(aset const-vector ,(car uninterned) | ||
| 1872 | ,(get symbol 'byte-compile-regenerate)) | ||
| 1873 | `(aset const-vector ,(car uninterned) | ||
| 1874 | (make-symbol ',(symbol-name symbol))))) | ||
| 1875 | (setq modifiers (cons fixup modifiers))) | ||
| 1876 | (setq uninterned (cdr uninterned))) | ||
| 1877 | `(let* ((function ,fun) (const-vector (aref function 2))) | ||
| 1878 | ,@modifiers | ||
| 1879 | function)) | ||
| 1880 | fun))) | ||
| 1881 | ;; b-c-lambda didn't produce a compiled-function, so it's either a trivial | 1850 | ;; b-c-lambda didn't produce a compiled-function, so it's either a trivial |
| 1882 | ;; function, or this is Emacs 18, or generate-emacs19-bytecodes is off. | 1851 | ;; function, or this is Emacs 18, or generate-emacs19-bytecodes is off. |
| 1883 | ((let (tmp) | 1852 | ((let (tmp) |
| @@ -2088,20 +2057,13 @@ If FORM is a lambda or a macro, byte-compile it as a function." | |||
| 2088 | (while (cond | 2057 | (while (cond |
| 2089 | ((memq (car (car rest)) '(byte-varref byte-constant)) | 2058 | ((memq (car (car rest)) '(byte-varref byte-constant)) |
| 2090 | (setq tmp (car (cdr (car rest)))) | 2059 | (setq tmp (car (cdr (car rest)))) |
| 2091 | ;; If we find an uninterned symbol as a constant | 2060 | (if (if (eq (car (car rest)) 'byte-constant) |
| 2092 | ;; or variable, this expression must be compiled! | 2061 | (or (consp tmp) |
| 2093 | ;; That is because byte-compile-byte-code-maker | 2062 | (and (symbolp tmp) |
| 2094 | ;; must get a chance to process the uninterned symbol. | 2063 | (not (memq tmp '(nil t)))))) |
| 2095 | (if (and (symbolp tmp) | 2064 | (if maycall |
| 2096 | (not (eq tmp (intern-soft (symbol-name tmp))))) | 2065 | (setq body (cons (list 'quote tmp) body))) |
| 2097 | nil | 2066 | (setq body (cons tmp body)))) |
| 2098 | (if (if (eq (car (car rest)) 'byte-constant) | ||
| 2099 | (or (consp tmp) | ||
| 2100 | (and (symbolp tmp) | ||
| 2101 | (not (memq tmp '(nil t)))))) | ||
| 2102 | (if maycall | ||
| 2103 | (setq body (cons (list 'quote tmp) body))) | ||
| 2104 | (setq body (cons tmp body))))) | ||
| 2105 | ((and maycall | 2067 | ((and maycall |
| 2106 | ;; Allow a funcall if at most one atom follows it. | 2068 | ;; Allow a funcall if at most one atom follows it. |
| 2107 | (null (nthcdr 3 rest)) | 2069 | (null (nthcdr 3 rest)) |