[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 39bdb3f 2/3: Vanilla build warning clean-up
From: |
Andrea Corallo |
Subject: |
feature/native-comp 39bdb3f 2/3: Vanilla build warning clean-up |
Date: |
Fri, 4 Dec 2020 17:27:30 -0500 (EST) |
branch: feature/native-comp
commit 39bdb3f6f54cdba80f1efbecab4bbb08428e7cc8
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
Vanilla build warning clean-up
* lisp/emacs-lisp/disass.el (native-comp-unit-file)
(subr-native-comp-unit): Declare function.
* lisp/progmodes/elisp-mode.el (native-compile): Likewise.
* lisp/emacs-lisp/package.el (comp-el-to-eln-filename): Likewise.
* lisp/startup.el (normal-top-level): Silence warning.
* src/data.c (syms_of_data): 'Ssubr_native_lambda_list' is always
defined.
* src/pdumper.c (dump_cold_native_subr): Move under ifdefs.
(dump_drain_cold_data): Add ifdefs.
---
lisp/emacs-lisp/disass.el | 3 ++-
lisp/emacs-lisp/package.el | 1 +
lisp/progmodes/elisp-mode.el | 1 +
lisp/startup.el | 1 +
src/data.c | 2 +-
src/pdumper.c | 4 ++++
6 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el
index 7e7db7b..7fb370f 100644
--- a/lisp/emacs-lisp/disass.el
+++ b/lisp/emacs-lisp/disass.el
@@ -75,7 +75,8 @@ redefine OBJECT if it is a symbol."
(disassemble-internal object indent nil)))
nil)
-
+(declare-function native-comp-unit-file "data.c")
+(declare-function subr-native-comp-unit "data.c")
(cl-defun disassemble-internal (obj indent interactive-p)
(let ((macro 'nil)
(name (when (symbolp obj)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 0ee2e58..e980f88 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -2221,6 +2221,7 @@ If some packages are not installed propose to install
them."
(equal (cadr (assq (package-desc-name pkg) package-alist))
pkg))
+(declare-function comp-el-to-eln-filename "comp.c")
(defun package--delete-directory (dir)
"Delete DIR recursively.
Clean-up the corresponding .eln files if Emacs is native
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index dac3aaf..13bba7f 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -203,6 +203,7 @@ All commands in `lisp-mode-shared-map' are inherited by
this map.")
(byte-recompile-file buffer-file-name nil 0)
(load buffer-file-name))
+(declare-function native-compile "comp")
(defun emacs-lisp-native-compile-and-load ()
"Native-compile synchronously the current file (if it has changed).
Load the compiled code when finished.
diff --git a/lisp/startup.el b/lisp/startup.el
index 2beeaa1..f9de7fa 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -535,6 +535,7 @@ It is the default value of the variable `top-level'."
(startup--xdg-or-homedot startup--xdg-config-home-emacs nil))
(when (featurep 'nativecomp)
+ (defvar comp-eln-load-path)
(let ((path-env (getenv "EMACSNATIVELOADPATH")))
(when path-env
(dolist (path (split-string path-env ":"))
diff --git a/src/data.c b/src/data.c
index 1435cb0..fea3986 100644
--- a/src/data.c
+++ b/src/data.c
@@ -4055,8 +4055,8 @@ syms_of_data (void)
defsubr (&Ssubr_arity);
defsubr (&Ssubr_name);
defsubr (&Ssubr_native_elisp_p);
-#ifdef HAVE_NATIVE_COMP
defsubr (&Ssubr_native_lambda_list);
+#ifdef HAVE_NATIVE_COMP
defsubr (&Ssubr_native_comp_unit);
defsubr (&Snative_comp_unit_file);
defsubr (&Snative_comp_unit_set_file);
diff --git a/src/pdumper.c b/src/pdumper.c
index 1a7aee6..b3abbd6 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -3405,6 +3405,7 @@ dump_cold_bignum (struct dump_context *ctx, Lisp_Object
object)
}
}
+#ifdef HAVE_NATIVE_COMP
static void
dump_cold_native_subr (struct dump_context *ctx, Lisp_Object subr)
{
@@ -3425,6 +3426,7 @@ dump_cold_native_subr (struct dump_context *ctx,
Lisp_Object subr)
const char *c_name = XSUBR (subr)->native_c_name[0];
dump_write (ctx, c_name, 1 + strlen (c_name));
}
+#endif
static void
dump_drain_cold_data (struct dump_context *ctx)
@@ -3469,9 +3471,11 @@ dump_drain_cold_data (struct dump_context *ctx)
case COLD_OP_BIGNUM:
dump_cold_bignum (ctx, data);
break;
+#ifdef HAVE_NATIVE_COMP
case COLD_OP_NATIVE_SUBR:
dump_cold_native_subr (ctx, data);
break;
+#endif
default:
emacs_abort ();
}