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))
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"))))
;;;###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
"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))))
"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))))
((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))
;; 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:
((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.
(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
(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)
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);
(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)))
(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))