[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 034d9b3 2/9: * comp.el: late-load support optional a
From: |
Andrea Corallo |
Subject: |
feature/native-comp 034d9b3 2/9: * comp.el: late-load support optional as `native-compile' parameter |
Date: |
Thu, 19 Mar 2020 14:41:51 -0400 (EDT) |
branch: feature/native-comp
commit 034d9b319c2d596d090364476a193fbc409026d6
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
* comp.el: late-load support optional as `native-compile' parameter
---
lisp/emacs-lisp/comp.el | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 3a56876..d077fa5 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -214,7 +214,9 @@ This is to build the prev field.")
:documentation "Relocated data that cannot be moved into pure space.
This is tipically for top-level forms other than defun.")
(d-ephemeral (make-comp-data-container) :type comp-data-container
- :documentation "Relocated data not necessary after load."))
+ :documentation "Relocated data not necessary after load.")
+ (with-late-load nil :type boolean
+ :documentation "When non nil support late load."))
(cl-defstruct comp-args-base
(min nil :type number
@@ -1289,7 +1291,8 @@ into the C code forwarding the compilation unit."
Top-level forms for the current context are rendered too."
(mapc #'comp-add-func-to-ctxt (mapcar #'comp-limplify-function lap-funcs))
(comp-add-func-to-ctxt (comp-limplify-top-level nil))
- (comp-add-func-to-ctxt (comp-limplify-top-level t)))
+ (when (comp-ctxt-with-late-load comp-ctxt)
+ (comp-add-func-to-ctxt (comp-limplify-top-level t))))
;;; SSA pass specific code.
@@ -2163,7 +2166,7 @@ display a message."
;;; Compiler entry points.
;;;###autoload
-(defun native-compile (function-or-file)
+(defun native-compile (function-or-file &optional with-late-load)
"Compile FUNCTION-OR-FILE into native code.
This is the entry-point for the Emacs Lisp native compiler.
FUNCTION-OR-FILE is a function symbol or a path to an Elisp file.
@@ -2188,7 +2191,8 @@ Return the compilation unit file name."
(output-filename
(file-name-sans-extension
(file-name-nondirectory expanded-filename))))
- (expand-file-name output-filename output-dir))))))
+ (expand-file-name output-filename output-dir)))
+ :with-late-load with-late-load)))
(comp-log "\n\n" 1)
(condition-case err
(mapc (lambda (pass)
- feature/native-comp updated (e57d5a7 -> 64a6709), Andrea Corallo, 2020/03/19
- feature/native-comp f2c4377 1/9: * comp.el: Have the compiler generates 'late_top_level_run', Andrea Corallo, 2020/03/19
- feature/native-comp b53fc68 3/9: Extend low level code for late load, Andrea Corallo, 2020/03/19
- feature/native-comp 034d9b3 2/9: * comp.el: late-load support optional as `native-compile' parameter,
Andrea Corallo <=
- feature/native-comp 7565a4a 5/9: Command late load when deferring compilation, Andrea Corallo, 2020/03/19
- feature/native-comp 64a6709 9/9: * comp.el (comp-async-jobs-number): Fix customize type., Andrea Corallo, 2020/03/19
- feature/native-comp 0179d95 6/9: * comp.c (native-elisp-load): Guard against misisng file., Andrea Corallo, 2020/03/19
- feature/native-comp c3e640b 4/9: * comp.el: Extend `native-compile-async' for load and late-load, Andrea Corallo, 2020/03/19
- feature/native-comp b070571 7/9: * comp.el (comp-run-async-workers): Load only if compilation succeed, Andrea Corallo, 2020/03/19
- feature/native-comp 981cc15 8/9: Merge remote-tracking branch 'savannah/master' into HEAD, Andrea Corallo, 2020/03/19