mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-31 11:13:50 +00:00
Rename feature nativecomp' into
native-compile'
* test/src/comp-tests.el : Rename feature `nativecomp' into `native-compile'. * test/lisp/help-fns-tests.el (help-fns-test-lisp-defun): Likewise. * src/comp.c (syms_of_comp): Likewise. * lisp/startup.el (normal-top-level): Likewise. * lisp/loadup.el: Likewise. * lisp/help.el (help-function-arglist): Likewise. * lisp/emacs-lisp/package.el (package--native-compile-async) (package--delete-directory): Likewise. * lisp/emacs-lisp/nadvice.el (advice--add-function): Likewise. * lisp/emacs-lisp/comp.el (comp-ensure-native-compiler): Likewise. * lisp/emacs-lisp/advice.el (ad-add-advice): Likewise.
This commit is contained in:
parent
e9baa733b8
commit
40736357b8
@ -2076,7 +2076,7 @@ mapped to the closest extremal position).
|
||||
If FUNCTION was not advised already, its advice info will be
|
||||
initialized. Redefining a piece of advice whose name is part of
|
||||
the cache-id will clear the cache."
|
||||
(when (and (featurep 'nativecomp)
|
||||
(when (and (featurep 'native-compile)
|
||||
(subr-primitive-p (symbol-function function)))
|
||||
(comp-subr-trampoline-install function))
|
||||
(cond ((not (ad-is-advised function))
|
||||
|
@ -938,7 +938,7 @@ In use by the back-end."
|
||||
Signal an error otherwise.
|
||||
To be used by all entry points."
|
||||
(cond
|
||||
((null (featurep 'nativecomp))
|
||||
((null (featurep 'native-compile))
|
||||
(error "Emacs was not compiled with native compiler support (--with-native-compilation)"))
|
||||
((null (native-comp-available-p))
|
||||
(error "Cannot find libgccjit library"))))
|
||||
|
@ -320,7 +320,7 @@ is also interactive. There are 3 cases:
|
||||
|
||||
;;;###autoload
|
||||
(defun advice--add-function (where ref function props)
|
||||
(when (and (featurep 'nativecomp)
|
||||
(when (and (featurep 'native-compile)
|
||||
(subr-primitive-p (gv-deref ref)))
|
||||
(let ((subr-name (intern (subr-name (gv-deref ref)))))
|
||||
;; Requiring the native compiler to advice `macroexpand' cause a
|
||||
|
@ -1081,7 +1081,7 @@ This assumes that `pkg-desc' has already been activated with
|
||||
"Native compile installed package PKG-DESC asynchronously.
|
||||
This assumes that `pkg-desc' has already been activated with
|
||||
`package-activate-1'."
|
||||
(when (and (featurep 'nativecomp)
|
||||
(when (and (featurep 'native-compile)
|
||||
(native-comp-available-p))
|
||||
(let ((warning-minimum-level :error))
|
||||
(native-compile-async (package-desc-dir pkg-desc) t))))
|
||||
@ -2265,7 +2265,7 @@ confirmation to install packages."
|
||||
"Delete DIR recursively.
|
||||
Clean-up the corresponding .eln files if Emacs is native
|
||||
compiled."
|
||||
(when (featurep 'nativecomp)
|
||||
(when (featurep 'native-compile)
|
||||
(cl-loop
|
||||
for file in (directory-files-recursively dir ".el\\'")
|
||||
do (comp-clean-up-stale-eln (comp-el-to-eln-filename file))))
|
||||
|
@ -1890,7 +1890,7 @@ the same names as used in the original source code, when possible."
|
||||
((and (byte-code-function-p def) (listp (aref def 0))) (aref def 0))
|
||||
((eq (car-safe def) 'lambda) (nth 1 def))
|
||||
((eq (car-safe def) 'closure) (nth 2 def))
|
||||
((and (featurep 'nativecomp)
|
||||
((and (featurep 'native-compile)
|
||||
(subrp def)
|
||||
(listp (subr-native-lambda-list def)))
|
||||
(subr-native-lambda-list def))
|
||||
|
@ -449,7 +449,7 @@ lost after dumping")))
|
||||
;; At this point, we're ready to resume undo recording for scratch.
|
||||
(buffer-enable-undo "*scratch*")
|
||||
|
||||
(when (featurep 'nativecomp)
|
||||
(when (featurep 'native-compile)
|
||||
;; Fix the compilation unit filename to have it working when
|
||||
;; installed or if the source directory got moved. This is set to be
|
||||
;; a pair in the form of:
|
||||
@ -521,7 +521,7 @@ lost after dumping")))
|
||||
((equal dump-mode "bootstrap") "emacs")
|
||||
((equal dump-mode "pbootstrap") "bootstrap-emacs.pdmp")
|
||||
(t (error "unrecognized dump mode %s" dump-mode)))))
|
||||
(when (and (featurep 'nativecomp)
|
||||
(when (and (featurep 'native-compile)
|
||||
(equal dump-mode "pdump"))
|
||||
;; Don't enable this before bootstrap is completed, as the
|
||||
;; compiler infrastructure may not be usable yet.
|
||||
|
@ -537,7 +537,7 @@ It is the default value of the variable `top-level'."
|
||||
(setq user-emacs-directory
|
||||
(startup--xdg-or-homedot startup--xdg-config-home-emacs nil))
|
||||
|
||||
(when (featurep 'nativecomp)
|
||||
(when (featurep 'native-compile)
|
||||
;; Form `comp-eln-load-path'.
|
||||
(let ((path-env (getenv "EMACSNATIVELOADPATH")))
|
||||
(when path-env
|
||||
@ -639,7 +639,7 @@ It is the default value of the variable `top-level'."
|
||||
(set pathsym (mapcar (lambda (dir)
|
||||
(decode-coding-string dir coding t))
|
||||
path)))))
|
||||
(when (featurep 'nativecomp)
|
||||
(when (featurep 'native-compile)
|
||||
(let ((npath (symbol-value 'comp-eln-load-path)))
|
||||
(set 'comp-eln-load-path
|
||||
(mapcar (lambda (dir)
|
||||
|
@ -5403,7 +5403,7 @@ For internal use. */);
|
||||
doc: /* When non-nil assume the file being compiled to
|
||||
be preloaded. */);
|
||||
|
||||
Fprovide (intern_c_string ("nativecomp"), Qnil);
|
||||
Fprovide (intern_c_string ("native-compile"), Qnil);
|
||||
#endif /* #ifdef HAVE_NATIVE_COMP */
|
||||
|
||||
defsubr (&Snative_comp_available_p);
|
||||
|
@ -62,7 +62,7 @@ Return first line of the output of (describe-function-1 FUNC)."
|
||||
(should (string-match regexp result))))
|
||||
|
||||
(ert-deftest help-fns-test-lisp-defun ()
|
||||
(let ((regexp (if (featurep 'nativecomp)
|
||||
(let ((regexp (if (featurep 'native-compile)
|
||||
"a native compiled Lisp function in .+subr\\.el"
|
||||
"a compiled Lisp function in .+subr\\.el"))
|
||||
(result (help-fns-tests--describe-function 'last)))
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
(defconst comp-test-dyn-src (ert-resource-file "comp-test-funcs-dyn.el"))
|
||||
|
||||
(when (featurep 'nativecomp)
|
||||
(when (featurep 'native-compile)
|
||||
(require 'comp)
|
||||
(message "Compiling tests...")
|
||||
(load (native-compile comp-test-src))
|
||||
|
Loading…
Reference in New Issue
Block a user