]> git.eshelyaron.com Git - emacs.git/commitdiff
Improve warnings from native compiler
authorEli Zaretskii <eliz@gnu.org>
Fri, 5 Jul 2024 19:00:08 +0000 (22:00 +0300)
committerEshel Yaron <me@eshelyaron.com>
Sun, 7 Jul 2024 13:16:55 +0000 (15:16 +0200)
* src/comp.c (syms_of_comp) <native-compiler>: Rename from 'comp'.

* src/lread.c (maybe_swap_for_eln):
* lisp/emacs-lisp/comp.el (comp--fwprop):
* lisp/emacs-lisp/comp-run.el
(comp--accept-and-process-async-output, native--compile-async):
Adjust to the new symbol.

(cherry picked from commit 814710067f0558e308c7020b22e455fe0ece7878)

lisp/emacs-lisp/comp-run.el
lisp/emacs-lisp/comp.el
src/comp.c
src/lread.c

index 8e08eca7442fb0de84da5104bead1b38134e3346..17a9ab71f7ecf65e45106358c57ef9a4ed13667d 100644 (file)
@@ -195,7 +195,7 @@ processes from `comp-async-compilations'"
   (if native-comp-async-report-warnings-errors
       (let ((warning-suppress-types
              (if (eq native-comp-async-report-warnings-errors 'silent)
-                 (cons '(comp) warning-suppress-types)
+                 (cons '(native-compiler) warning-suppress-types)
                warning-suppress-types))
             (regexp (if (eq native-comp-async-warnings-errors-kind 'all)
                         "^.*?\\(?:Error\\|Warning\\): .*$"
@@ -211,7 +211,7 @@ processes from `comp-async-compilations'"
             (accept-process-output process)
             (goto-char (or comp-last-scanned-async-output (point-min)))
             (while (re-search-forward regexp nil t)
-              (display-warning 'comp (match-string 0)))
+              (display-warning 'native-compiler (match-string 0)))
             (setq comp-last-scanned-async-output (point-max)))))
     (accept-process-output process)))
 
@@ -446,7 +446,7 @@ bytecode definition was not changed in the meantime)."
                 (setf comp-files-queue
                       (append comp-files-queue `((,file . ,load)))
                       added-something t)
-              (display-warning 'comp
+              (display-warning 'native-compiler
                                (format "No write access for %s skipping."
                                        out-filename)))))))
     ;; Perhaps nothing passed `native--compile-async-skip-p'?
index 6c56fd78859b35686aa8407556a8c2cbdfb36a6e..2844e89c661d794900d7079849b0dfa6515a6d38 100644 (file)
@@ -2792,7 +2792,7 @@ Return t if something was changed."
                   finally
                   (when (= i 100)
                     (display-warning
-                     'comp
+                     'native-compiler
                      (format "fwprop pass jammed into %s?" (comp-func-name f))))
                   (comp-log (format "Propagation run %d times\n" i) 2))
                  (comp--rewrite-non-locals)
index df7fa3a519915578ebb3dd7ccfb7ce8a90c8ae54..3b372145d07f0d42f0dab92863d759a2fee6fe61 100644 (file)
@@ -5756,7 +5756,7 @@ natively-compiled one.  */);
   DEFSYM (Qd_ephemeral, "d-ephemeral");
 
   /* Others.  */
-  DEFSYM (Qcomp, "comp");
+  DEFSYM (Qnative_compiler, "native-compiler");
   DEFSYM (Qfixnum, "fixnum");
   DEFSYM (Qscratch, "scratch");
   DEFSYM (Qlate, "late");
index 047a201eaaa76ea15af658ec3a6d7bd0475097f2..c3b0e8a3ef5ddfe543ca79dcc5b6a8b330829b60 100644 (file)
@@ -1883,7 +1883,7 @@ maybe_swap_for_eln (bool no_native, Lisp_Object *filename, int *fd,
                return;
              Vdelayed_warnings_list
                = Fcons (list2
-                        (Qcomp,
+                        (Qnative_compiler,
                          CALLN (Fformat,
                                 build_string ("Cannot look up .eln file "
                                               "for %s because no source "