mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 00:00:39 -08:00
* lisp/emacs-lisp/bytecomp.el (byte-compile-make-closure): Minor optimization
This commit is contained in:
parent
ce28de5d3a
commit
ab8a34ce8a
1 changed files with 2 additions and 2 deletions
|
|
@ -3924,7 +3924,7 @@ discarding."
|
|||
docstring-exp)) ;Otherwise, we don't need a closure.
|
||||
(cl-assert (byte-code-function-p fun))
|
||||
(byte-compile-form
|
||||
(if (or (not docstring-exp) (stringp docstring-exp))
|
||||
(if (macroexp-const-p docstring-exp)
|
||||
;; Use symbols V0, V1 ... as placeholders for closure variables:
|
||||
;; they should be short (to save space in the .elc file), yet
|
||||
;; distinct when disassembled.
|
||||
|
|
@ -3940,7 +3940,7 @@ discarding."
|
|||
(vconcat dummy-vars (aref fun 2))
|
||||
(aref fun 3)
|
||||
(if docstring-exp
|
||||
(cons docstring-exp (cdr opt-args))
|
||||
(cons (eval docstring-exp t) (cdr opt-args))
|
||||
opt-args))))
|
||||
`(make-closure ,proto-fun ,@env))
|
||||
;; Nontrivial doc string expression: create a bytecode object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue