diff options
| author | Noam Postavsky | 2017-08-13 10:06:45 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2017-08-29 22:58:50 -0400 |
| commit | 112fbe35153b2cb66b4daca32a84b18192c814db (patch) | |
| tree | 0be3c2a6b9b8215ee9c6059ea51b651741d424da | |
| parent | 70bb510a7eb1a3010cfa034884b7e5ab2063ece3 (diff) | |
| download | emacs-112fbe35153b2cb66b4daca32a84b18192c814db.tar.gz emacs-112fbe35153b2cb66b4daca32a84b18192c814db.zip | |
Minor simplification for byte-compile-constant-push
* lisp/emacs-lisp/bytecomp.el (byte-compile-constant): Move the meat
of the code from here...
(byte-compile-constant-push): ... to here. No need to bind
byte-compile--for-effect anymore.
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 48bbd618712..dc8839e6f99 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -3342,15 +3342,14 @@ for symbols generated by the byte compiler itself." | |||
| 3342 | (defun byte-compile-constant (const) | 3342 | (defun byte-compile-constant (const) |
| 3343 | (if byte-compile--for-effect | 3343 | (if byte-compile--for-effect |
| 3344 | (setq byte-compile--for-effect nil) | 3344 | (setq byte-compile--for-effect nil) |
| 3345 | (when (symbolp const) | 3345 | (inline (byte-compile-push-constant const)))) |
| 3346 | (byte-compile-set-symbol-position const)) | ||
| 3347 | (byte-compile-out 'byte-constant (byte-compile-get-constant const)))) | ||
| 3348 | 3346 | ||
| 3349 | ;; Use this for a constant that is not the value of its containing form. | 3347 | ;; Use this for a constant that is not the value of its containing form. |
| 3350 | ;; This ignores byte-compile--for-effect. | 3348 | ;; This ignores byte-compile--for-effect. |
| 3351 | (defun byte-compile-push-constant (const) | 3349 | (defun byte-compile-push-constant (const) |
| 3352 | (let ((byte-compile--for-effect nil)) | 3350 | (when (symbolp const) |
| 3353 | (inline (byte-compile-constant const)))) | 3351 | (byte-compile-set-symbol-position const)) |
| 3352 | (byte-compile-out 'byte-constant (byte-compile-get-constant const))) | ||
| 3354 | 3353 | ||
| 3355 | ;; Compile those primitive ordinary functions | 3354 | ;; Compile those primitive ordinary functions |
| 3356 | ;; which have special byte codes just for speed. | 3355 | ;; which have special byte codes just for speed. |