emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2ebe0524e8: More aggressive bytecode split between top-level form


From: Mattias Engdegård
Subject: master 2ebe0524e8: More aggressive bytecode split between top-level forms (bug#55972)
Date: Sat, 18 Jun 2022 09:22:17 -0400 (EDT)

branch: master
commit 2ebe0524e823c2b811f484bd4df977df5fa49203
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    More aggressive bytecode split between top-level forms (bug#55972)
    
    * lisp/emacs-lisp/bytecomp.el (byte-compile-keep-pending):
    Allow bytecode split between all kinds of top-level forms, not just
    those with chunk handlers, to prevent individual chunks from growing
    too large.  In particular this helps compilation of
    package-quickstart.el.
---
 lisp/emacs-lisp/bytecomp.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index d28ec0be16..7f408472da 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2521,13 +2521,12 @@ list that represents a doc string reference.
 (defun byte-compile-keep-pending (form &optional handler)
   (if (memq byte-optimize '(t source))
       (setq form (byte-optimize-one-form form t)))
+  ;; To avoid consing up monstrously large forms at load time, we split
+  ;; the output regularly.
+  (when (nthcdr 300 byte-compile-output)
+    (byte-compile-flush-pending))
   (if handler
       (let ((byte-compile--for-effect t))
-       ;; To avoid consing up monstrously large forms at load time, we split
-       ;; the output regularly.
-       (and (memq (car-safe form) '(fset defalias))
-            (nthcdr 300 byte-compile-output)
-            (byte-compile-flush-pending))
        (funcall handler form)
        (if byte-compile--for-effect
            (byte-compile-discard)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]