[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp fda7988 1/7: * Move context output computation in `c
From: |
Andrea Corallo |
Subject: |
feature/native-comp fda7988 1/7: * Move context output computation in `comp-spill-lap-function' |
Date: |
Wed, 14 Oct 2020 05:13:46 -0400 (EDT) |
branch: feature/native-comp
commit fda798808f8b518313cff3363a6ba72baed2d758
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Move context output computation in `comp-spill-lap-function'
* lisp/emacs-lisp/comp.el (comp-spill-lap-function): Move
output filename computation here.
(native-compile): From here.
---
lisp/emacs-lisp/comp.el | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index b4a86fc..26654a3 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -662,6 +662,9 @@ clashes."
(cl-defmethod comp-spill-lap-function ((function-name symbol))
"Byte-compile FUNCTION-NAME spilling data from the byte compiler."
+ (unless (comp-ctxt-output comp-ctxt)
+ (setf (comp-ctxt-output comp-ctxt)
+ (make-temp-file (symbol-name function-name) nil ".eln")))
(let* ((f (symbol-function function-name))
(c-name (comp-c-func-name function-name "F"))
(func (make-comp-func-l :name function-name
@@ -740,6 +743,11 @@ clashes."
(byte-compile-file filename)
(unless byte-to-native-top-level-forms
(signal 'native-compiler-error-empty-byte filename))
+ (unless (comp-ctxt-output comp-ctxt)
+ (setf (comp-ctxt-output comp-ctxt) (comp-el-to-eln-filename
+ filename
+ (when byte-native-for-bootstrap
+ (car (last comp-eln-load-path))))))
(setf (comp-ctxt-top-level-forms comp-ctxt)
(cl-loop
for form in (reverse byte-to-native-top-level-forms)
@@ -2815,18 +2823,8 @@ Return the compile object filename."
(comp-native-compiling t)
;; Have byte compiler signal an error when compilation fails.
(byte-compile-debug t)
- (comp-ctxt
- (make-comp-ctxt
- :output (or (when output
- (expand-file-name output))
- (if (symbolp function-or-file)
- (make-temp-file (symbol-name function-or-file) nil
- ".eln")
- (comp-el-to-eln-filename
- function-or-file
- (when byte-native-for-bootstrap
- (car (last comp-eln-load-path))))))
- :with-late-load with-late-load)))
+ (comp-ctxt (make-comp-ctxt :output output
+ :with-late-load with-late-load)))
(comp-log "\n\n" 1)
(condition-case err
(mapc (lambda (pass)
- feature/native-comp updated (237fd33 -> f8505fd), Andrea Corallo, 2020/10/14
- feature/native-comp 4bea0c0 2/7: * Allow for lambda forms as native compilation input, Andrea Corallo, 2020/10/14
- feature/native-comp fda7988 1/7: * Move context output computation in `comp-spill-lap-function',
Andrea Corallo <=
- feature/native-comp 4f0e879 4/7: Rework `native-compile' interface so it can return compiled functions, Andrea Corallo, 2020/10/14
- feature/native-comp e9c150b 5/7: * Add a test to verify form native compilation., Andrea Corallo, 2020/10/14
- feature/native-comp 03e98f9 6/7: Use form native compilation in `comp-trampoline-compile', Andrea Corallo, 2020/10/14
- feature/native-comp 8861ee8 3/7: Have `native-elisp-load' return the last registerd function, Andrea Corallo, 2020/10/14
- feature/native-comp f8505fd 7/7: Merge remote-tracking branch 'savannah/master' into HEAD, Andrea Corallo, 2020/10/14