[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp e972837 7/8: * Fix free function compilation load pr
From: |
Andrea Corallo |
Subject: |
feature/native-comp e972837 7/8: * Fix free function compilation load process. |
Date: |
Mon, 14 Sep 2020 17:22:57 -0400 (EDT) |
branch: feature/native-comp
commit e9728375763c61e3b890530b202b856d28c44646
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Fix free function compilation load process.
* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Do not crash
if the eln filename is not canonical (tmp file or manual load).
---
lisp/emacs-lisp/comp.el | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index f168980..25e2de9 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2509,17 +2509,18 @@ Prepare every function for final compilation and drive
the C back-end."
(defun comp-clean-up-stale-eln (file)
"Given FILE remove all the .eln files in `comp-eln-load-path'
sharing the original source filename (including FILE)."
- (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos) file)
- (cl-loop
- with filename-hash = (match-string 1 file)
- with regexp = (rx-to-string
- `(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos))
- for dir in (butlast comp-eln-load-path) ; Skip last dir.
- do (cl-loop
- with full-dir = (concat dir comp-native-version-dir)
- for f in (when (file-exists-p full-dir)
- (directory-files full-dir t regexp t))
- do (comp-delete-or-replace-file f))))
+ (when (string-match (rx "-" (group-n 1 (1+ hex)) "-" (1+ hex) ".eln" eos)
+ file)
+ (cl-loop
+ with filename-hash = (match-string 1 file)
+ with regexp = (rx-to-string
+ `(seq "-" ,filename-hash "-" (1+ hex) ".eln" eos))
+ for dir in (butlast comp-eln-load-path) ; Skip last dir.
+ do (cl-loop
+ with full-dir = (concat dir comp-native-version-dir)
+ for f in (when (file-exists-p full-dir)
+ (directory-files full-dir t regexp t))
+ do (comp-delete-or-replace-file f)))))
(defun comp-delete-or-replace-file (oldfile &optional newfile)
"Replace OLDFILE with NEWFILE.
- feature/native-comp updated (21021e5 -> 5f37c18), Andrea Corallo, 2020/09/14
- feature/native-comp c4cc139 1/8: * lisp/emacs-lisp/cl-macs.el (cl-the): Emit compiler hints when native., Andrea Corallo, 2020/09/14
- feature/native-comp 9531271 2/8: * Add 'cl-optimize' as function declaration, Andrea Corallo, 2020/09/14
- feature/native-comp 2da2ad2 5/8: * lisp/emacs-lisp/comp.el (comp-sp): Better style gv-setter declaration., Andrea Corallo, 2020/09/14
- feature/native-comp a3dc11e 4/8: * Remove type check emission from type hints low level primitives, Andrea Corallo, 2020/09/14
- feature/native-comp 82171a8 6/8: * Add gv-setters for compiler hints, Andrea Corallo, 2020/09/14
- feature/native-comp e972837 7/8: * Fix free function compilation load process.,
Andrea Corallo <=
- feature/native-comp c9a9b07 3/8: * lisp/emacs-lisp/cl-macs.el: Define fixnum and bignum., Andrea Corallo, 2020/09/14
- feature/native-comp 5f37c18 8/8: * test/src/comp-tests.el (comp-tests-bootstrap): Print compilation time., Andrea Corallo, 2020/09/14