aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2021-05-06 16:28:43 +0200
committerAndrea Corallo2021-05-06 17:16:09 +0200
commitfbbcbed10ee89e0865bbddc6683ff626ec488ee9 (patch)
treede3873d00945fc514f6bf525f4ecea9206622ce4
parent901ce566037b27233b907a51a9cbd330c77830ba (diff)
downloademacs-fbbcbed10ee89e0865bbddc6683ff626ec488ee9.tar.gz
emacs-fbbcbed10ee89e0865bbddc6683ff626ec488ee9.zip
Rename comp-eln-load-path → native-comp-eln-load-path
* src/comp.c (Fcomp_el_to_eln_filename): Rename comp-eln-load-path → native-comp-eln-load-path. * src/lread.c (maybe_swap_for_eln): Likewise. * lisp/startup.el (native-comp-eln-load-path) (normal-top-level): Likewise. * lisp/emacs-lisp/comp.el (comp-spill-lap-function, comp-final) (comp-eln-load-path-eff, comp-trampoline-compile) (comp-clean-up-stale-eln, comp-run-async-workers) (comp-lookup-eln, batch-byte-native-compile-for-bootstrap): Likewise.
-rw-r--r--lisp/emacs-lisp/comp.el20
-rw-r--r--lisp/startup.el16
-rw-r--r--src/comp.c14
-rw-r--r--src/lread.c2
4 files changed, 26 insertions, 26 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 434e0fb4165..684b814292f 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -1333,7 +1333,7 @@ clashes."
1333 (setf (comp-ctxt-output comp-ctxt) (comp-el-to-eln-filename 1333 (setf (comp-ctxt-output comp-ctxt) (comp-el-to-eln-filename
1334 filename 1334 filename
1335 (when byte-native-for-bootstrap 1335 (when byte-native-for-bootstrap
1336 (car (last comp-eln-load-path)))))) 1336 (car (last native-comp-eln-load-path))))))
1337 (setf (comp-ctxt-speed comp-ctxt) (alist-get 'native-comp-speed 1337 (setf (comp-ctxt-speed comp-ctxt) (alist-get 'native-comp-speed
1338 byte-native-qualities) 1338 byte-native-qualities)
1339 (comp-ctxt-debug comp-ctxt) (alist-get 'native-comp-debug 1339 (comp-ctxt-debug comp-ctxt) (alist-get 'native-comp-debug
@@ -3653,7 +3653,7 @@ Prepare every function for final compilation and drive the C back-end."
3653 (setf native-comp-verbose ,native-comp-verbose 3653 (setf native-comp-verbose ,native-comp-verbose
3654 comp-libgccjit-reproducer ,comp-libgccjit-reproducer 3654 comp-libgccjit-reproducer ,comp-libgccjit-reproducer
3655 comp-ctxt ,comp-ctxt 3655 comp-ctxt ,comp-ctxt
3656 comp-eln-load-path ',comp-eln-load-path 3656 native-comp-eln-load-path ',native-comp-eln-load-path
3657 native-comp-driver-options 3657 native-comp-driver-options
3658 ',native-comp-driver-options 3658 ',native-comp-driver-options
3659 load-path ',load-path) 3659 load-path ',load-path)
@@ -3703,12 +3703,12 @@ Prepare every function for final compilation and drive the C back-end."
3703 3703
3704(defun comp-eln-load-path-eff () 3704(defun comp-eln-load-path-eff ()
3705 "Return a list of effective eln load directories. 3705 "Return a list of effective eln load directories.
3706Account for `comp-eln-load-path' and `comp-native-version-dir'." 3706Account for `native-comp-eln-load-path' and `comp-native-version-dir'."
3707 (mapcar (lambda (dir) 3707 (mapcar (lambda (dir)
3708 (expand-file-name comp-native-version-dir 3708 (expand-file-name comp-native-version-dir
3709 (file-name-as-directory 3709 (file-name-as-directory
3710 (expand-file-name dir invocation-directory)))) 3710 (expand-file-name dir invocation-directory))))
3711 comp-eln-load-path)) 3711 native-comp-eln-load-path))
3712 3712
3713(defun comp-trampoline-filename (subr-name) 3713(defun comp-trampoline-filename (subr-name)
3714 "Given SUBR-NAME return the filename containing the trampoline." 3714 "Given SUBR-NAME return the filename containing the trampoline."
@@ -3772,14 +3772,14 @@ Return the trampoline if found or nil otherwise."
3772 when (file-writable-p f) 3772 when (file-writable-p f)
3773 do (cl-return f) 3773 do (cl-return f)
3774 finally (error "Cannot find suitable directory for output in \ 3774 finally (error "Cannot find suitable directory for output in \
3775`comp-eln-load-path'"))))) 3775`native-comp-eln-load-path'")))))
3776 3776
3777 3777
3778;; Some entry point support code. 3778;; Some entry point support code.
3779 3779
3780;;;###autoload 3780;;;###autoload
3781(defun comp-clean-up-stale-eln (file) 3781(defun comp-clean-up-stale-eln (file)
3782 "Given FILE remove all its *.eln files in `comp-eln-load-path' 3782 "Given FILE remove all its *.eln files in `native-comp-eln-load-path'
3783sharing the original source filename (including FILE)." 3783sharing the original source filename (including FILE)."
3784 (when (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos) 3784 (when (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos)
3785 file) 3785 file)
@@ -3910,7 +3910,7 @@ display a message."
3910 native-comp-verbose ,native-comp-verbose 3910 native-comp-verbose ,native-comp-verbose
3911 comp-libgccjit-reproducer ,comp-libgccjit-reproducer 3911 comp-libgccjit-reproducer ,comp-libgccjit-reproducer
3912 comp-async-compilation t 3912 comp-async-compilation t
3913 comp-eln-load-path ',comp-eln-load-path 3913 native-comp-eln-load-path ',native-comp-eln-load-path
3914 native-comp-driver-options 3914 native-comp-driver-options
3915 ',native-comp-driver-options 3915 ',native-comp-driver-options
3916 load-path ',load-path 3916 load-path ',load-path
@@ -4123,10 +4123,10 @@ bytecode definition was not changed in the meantime)."
4123;;;###autoload 4123;;;###autoload
4124(defun comp-lookup-eln (filename) 4124(defun comp-lookup-eln (filename)
4125 "Given a Lisp source FILENAME return the corresponding .eln file if found. 4125 "Given a Lisp source FILENAME return the corresponding .eln file if found.
4126Search happens in `comp-eln-load-path'." 4126Search happens in `native-comp-eln-load-path'."
4127 (cl-loop 4127 (cl-loop
4128 with eln-filename = (comp-el-to-eln-rel-filename filename) 4128 with eln-filename = (comp-el-to-eln-rel-filename filename)
4129 for dir in comp-eln-load-path 4129 for dir in native-comp-eln-load-path
4130 for f = (expand-file-name eln-filename 4130 for f = (expand-file-name eln-filename
4131 (expand-file-name comp-native-version-dir 4131 (expand-file-name comp-native-version-dir
4132 (expand-file-name 4132 (expand-file-name
@@ -4169,7 +4169,7 @@ Native compilation equivalent to `batch-byte-compile'."
4169 "Like `batch-native-compile', but used for bootstrap. 4169 "Like `batch-native-compile', but used for bootstrap.
4170Generate .elc files in addition to the .eln files. 4170Generate .elc files in addition to the .eln files.
4171Force the produced .eln to be outputted in the eln system 4171Force the produced .eln to be outputted in the eln system
4172directory (the last entry in `comp-eln-load-path'). 4172directory (the last entry in `native-comp-eln-load-path').
4173If the environment variable 'NATIVE_DISABLED' is set, only byte 4173If the environment variable 'NATIVE_DISABLED' is set, only byte
4174compile." 4174compile."
4175 (comp-ensure-native-compiler) 4175 (comp-ensure-native-compiler)
diff --git a/lisp/startup.el b/lisp/startup.el
index 6bab9e364c2..bb25c1b7b0b 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -519,7 +519,7 @@ DIRS are relative."
519 xdg-dir) 519 xdg-dir)
520 (t emacs-d-dir)))) 520 (t emacs-d-dir))))
521 521
522(defvar comp-eln-load-path) 522(defvar native-comp-eln-load-path)
523(defun normal-top-level () 523(defun normal-top-level ()
524 "Emacs calls this function when it first starts up. 524 "Emacs calls this function when it first starts up.
525It sets `command-line-processed', processes the command-line, 525It sets `command-line-processed', processes the command-line,
@@ -538,21 +538,21 @@ It is the default value of the variable `top-level'."
538 (startup--xdg-or-homedot startup--xdg-config-home-emacs nil)) 538 (startup--xdg-or-homedot startup--xdg-config-home-emacs nil))
539 539
540 (when (featurep 'native-compile) 540 (when (featurep 'native-compile)
541 ;; Form `comp-eln-load-path'. 541 ;; Form `native-comp-eln-load-path'.
542 (let ((path-env (getenv "EMACSNATIVELOADPATH"))) 542 (let ((path-env (getenv "EMACSNATIVELOADPATH")))
543 (when path-env 543 (when path-env
544 (dolist (path (split-string path-env path-separator)) 544 (dolist (path (split-string path-env path-separator))
545 (unless (string= "" path) 545 (unless (string= "" path)
546 (push path comp-eln-load-path))))) 546 (push path native-comp-eln-load-path)))))
547 (push (expand-file-name "eln-cache/" user-emacs-directory) 547 (push (expand-file-name "eln-cache/" user-emacs-directory)
548 comp-eln-load-path) 548 native-comp-eln-load-path)
549 ;; When $HOME is set to '/nonexistent' means we are running the 549 ;; When $HOME is set to '/nonexistent' means we are running the
550 ;; testsuite, add a temporary folder in front to produce there 550 ;; testsuite, add a temporary folder in front to produce there
551 ;; new compilations. 551 ;; new compilations.
552 (when (equal (getenv "HOME") "/nonexistent") 552 (when (equal (getenv "HOME") "/nonexistent")
553 (let ((tmp-dir (make-temp-file "emacs-testsuite-" t))) 553 (let ((tmp-dir (make-temp-file "emacs-testsuite-" t)))
554 (add-hook 'kill-emacs-hook (lambda () (delete-directory tmp-dir t))) 554 (add-hook 'kill-emacs-hook (lambda () (delete-directory tmp-dir t)))
555 (push tmp-dir comp-eln-load-path)))) 555 (push tmp-dir native-comp-eln-load-path))))
556 ;; Look in each dir in load-path for a subdirs.el file. If we 556 ;; Look in each dir in load-path for a subdirs.el file. If we
557 ;; find one, load it, which will add the appropriate subdirs of 557 ;; find one, load it, which will add the appropriate subdirs of
558 ;; that dir into load-path. This needs to be done before setting 558 ;; that dir into load-path. This needs to be done before setting
@@ -640,12 +640,12 @@ It is the default value of the variable `top-level'."
640 (decode-coding-string dir coding t)) 640 (decode-coding-string dir coding t))
641 path))))) 641 path)))))
642 (when (featurep 'native-compile) 642 (when (featurep 'native-compile)
643 (let ((npath (symbol-value 'comp-eln-load-path))) 643 (let ((npath (symbol-value 'native-comp-eln-load-path)))
644 (set 'comp-eln-load-path 644 (set 'native-comp-eln-load-path
645 (mapcar (lambda (dir) 645 (mapcar (lambda (dir)
646 ;; Call expand-file-name to remove all the 646 ;; Call expand-file-name to remove all the
647 ;; pesky ".." from the directyory names in 647 ;; pesky ".." from the directyory names in
648 ;; comp-eln-load-path. 648 ;; native-comp-eln-load-path.
649 (expand-file-name 649 (expand-file-name
650 (decode-coding-string dir coding t))) 650 (decode-coding-string dir coding t)))
651 npath)))) 651 npath))))
diff --git a/src/comp.c b/src/comp.c
index 5cf94762a92..5128755bf18 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -4095,11 +4095,11 @@ directory in `comp-eln-load-path' otherwise. */)
4095 Lisp_Object source_filename = filename; 4095 Lisp_Object source_filename = filename;
4096 filename = Fcomp_el_to_eln_rel_filename (filename); 4096 filename = Fcomp_el_to_eln_rel_filename (filename);
4097 4097
4098 /* If base_dir was not specified search inside Vcomp_eln_load_path 4098 /* If base_dir was not specified search inside Vnative_comp_eln_load_path
4099 for the first directory where we have write access. */ 4099 for the first directory where we have write access. */
4100 if (NILP (base_dir)) 4100 if (NILP (base_dir))
4101 { 4101 {
4102 Lisp_Object eln_load_paths = Vcomp_eln_load_path; 4102 Lisp_Object eln_load_paths = Vnative_comp_eln_load_path;
4103 FOR_EACH_TAIL (eln_load_paths) 4103 FOR_EACH_TAIL (eln_load_paths)
4104 { 4104 {
4105 Lisp_Object dir = XCAR (eln_load_paths); 4105 Lisp_Object dir = XCAR (eln_load_paths);
@@ -4630,7 +4630,7 @@ void
4630eln_load_path_final_clean_up (void) 4630eln_load_path_final_clean_up (void)
4631{ 4631{
4632#ifdef WINDOWSNT 4632#ifdef WINDOWSNT
4633 Lisp_Object dir_tail = Vcomp_eln_load_path; 4633 Lisp_Object dir_tail = Vnative_comp_eln_load_path;
4634 FOR_EACH_TAIL (dir_tail) 4634 FOR_EACH_TAIL (dir_tail)
4635 { 4635 {
4636 Lisp_Object files_in_dir = 4636 Lisp_Object files_in_dir =
@@ -4755,7 +4755,7 @@ void
4755fixup_eln_load_path (Lisp_Object eln_filename) 4755fixup_eln_load_path (Lisp_Object eln_filename)
4756{ 4756{
4757 Lisp_Object last_cell = Qnil; 4757 Lisp_Object last_cell = Qnil;
4758 Lisp_Object tem = Vcomp_eln_load_path; 4758 Lisp_Object tem = Vnative_comp_eln_load_path;
4759 FOR_EACH_TAIL (tem) 4759 FOR_EACH_TAIL (tem)
4760 if (CONSP (tem)) 4760 if (CONSP (tem))
4761 last_cell = tem; 4761 last_cell = tem;
@@ -5127,7 +5127,7 @@ static bool
5127file_in_eln_sys_dir (Lisp_Object filename) 5127file_in_eln_sys_dir (Lisp_Object filename)
5128{ 5128{
5129 Lisp_Object eln_sys_dir = Qnil; 5129 Lisp_Object eln_sys_dir = Qnil;
5130 Lisp_Object tmp = Vcomp_eln_load_path; 5130 Lisp_Object tmp = Vnative_comp_eln_load_path;
5131 FOR_EACH_TAIL (tmp) 5131 FOR_EACH_TAIL (tmp)
5132 eln_sys_dir = XCAR (tmp); 5132 eln_sys_dir = XCAR (tmp);
5133 return !NILP (Fstring_match (Fregexp_quote (Fexpand_file_name (eln_sys_dir, 5133 return !NILP (Fstring_match (Fregexp_quote (Fexpand_file_name (eln_sys_dir,
@@ -5369,7 +5369,7 @@ For internal use. */);
5369 doc: /* Hash table eln-filename -> el-filename. */); 5369 doc: /* Hash table eln-filename -> el-filename. */);
5370 Vcomp_eln_to_el_h = CALLN (Fmake_hash_table, QCtest, Qequal); 5370 Vcomp_eln_to_el_h = CALLN (Fmake_hash_table, QCtest, Qequal);
5371 5371
5372 DEFVAR_LISP ("comp-eln-load-path", Vcomp_eln_load_path, 5372 DEFVAR_LISP ("native-comp-eln-load-path", Vnative_comp_eln_load_path,
5373 doc: /* List of eln cache directories. 5373 doc: /* List of eln cache directories.
5374 5374
5375If a directory is non absolute is assumed to be relative to 5375If a directory is non absolute is assumed to be relative to
@@ -5381,7 +5381,7 @@ The last directory of this list is assumed to be the system one. */);
5381 /* Temporary value in use for bootstrap. We can't do better as 5381 /* Temporary value in use for bootstrap. We can't do better as
5382 `invocation-directory' is still unset, will be fixed up during 5382 `invocation-directory' is still unset, will be fixed up during
5383 dump reload. */ 5383 dump reload. */
5384 Vcomp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil); 5384 Vnative_comp_eln_load_path = Fcons (build_string ("../native-lisp/"), Qnil);
5385 5385
5386 DEFVAR_BOOL ("comp-enable-subr-trampolines", comp_enable_subr_trampolines, 5386 DEFVAR_BOOL ("comp-enable-subr-trampolines", comp_enable_subr_trampolines,
5387 doc: /* If non-nil enable primitive trampoline synthesis. 5387 doc: /* If non-nil enable primitive trampoline synthesis.
diff --git a/src/lread.c b/src/lread.c
index 12e4ca66cdc..d2e6323cb14 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1700,7 +1700,7 @@ maybe_swap_for_eln (bool no_native, Lisp_Object *filename, int *fd,
1700 return; 1700 return;
1701 1701
1702 /* Search eln in the eln-cache directories. */ 1702 /* Search eln in the eln-cache directories. */
1703 Lisp_Object eln_path_tail = Vcomp_eln_load_path; 1703 Lisp_Object eln_path_tail = Vnative_comp_eln_load_path;
1704 Lisp_Object src_name = 1704 Lisp_Object src_name =
1705 Fsubstring (*filename, Qnil, make_fixnum (-1)); 1705 Fsubstring (*filename, Qnil, make_fixnum (-1));
1706 if (NILP (Ffile_exists_p (src_name))) 1706 if (NILP (Ffile_exists_p (src_name)))