diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 55 |
1 files changed, 22 insertions, 33 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index c84c254e585..cc5922c61c6 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -23,6 +23,7 @@ ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. ;;; Commentary: + ;; This code is an attempt to make the pig fly. ;; Or, to put it another way to make a 911 out of a turbocharged VW Bug. @@ -73,27 +74,23 @@ This intended for debugging the compiler itself. - 1 final limple is logged. - 2 LAP and final limple and some pass info are logged. - 3 max verbosity." - :type 'number - :group 'comp) + :type 'number) (defcustom comp-always-compile nil "Unconditionally (re-)compile all files." - :type 'boolean - :group 'comp) + :type 'boolean) (defcustom comp-deferred-compilation-black-list '() "List of regexps to exclude files from deferred native compilation. Skip if any is matching." - :type 'list - :group 'comp) + :type 'list) (defcustom comp-bootstrap-black-list '() "List of regexps to exclude files from native compilation during bootstrap. Skip if any is matching." - :type 'list - :group 'comp) + :type 'list) (defcustom comp-never-optimize-functions '(;; The following two are mandatory for Emacs to be working @@ -101,39 +98,33 @@ Skip if any is matching." ;; REMOVE. macroexpand rename-buffer) "Primitive functions for which we do not perform trampoline optimization." - :type 'list - :group 'comp) + :type 'list) (defcustom comp-async-jobs-number 0 "Default number of processes used for async compilation. When zero use half of the CPUs or at least one." - :type 'number - :group 'comp) + :type 'number) +;; FIXME: This an abnormal hook, and should be renamed to something +;; like `comp-async-cu-done-function'. (defcustom comp-async-cu-done-hook nil - "This hook is run whenever an asyncronous native compilation -finishes compiling a single compilation unit. + "Hook run after asynchronously compiling a single compilation unit. The argument FILE passed to the function is the filename used as compilation input." - :type 'hook - :group 'comp) + :type 'hook) (defcustom comp-async-all-done-hook nil - "This hook is run whenever the asyncronous native compilation -finishes compiling all input files." - :type 'hook - :group 'comp) + "Hook run after asynchronously compiling all input files." + :type 'hook) (defcustom comp-async-env-modifier-form nil - "Form to be evaluated by each asyncronous compilation worker -before compilation. Usable to modify the compiler environment." - :type 'list - :group 'comp) + "Form evaluated before compilation by each asyncronous compilation worker. +Usable to modify the compiler environment." + :type 'list) (defcustom comp-async-report-warnings-errors t "Report warnings and errors from native asynchronous compilation." - :type 'boolean - :group 'comp) + :type 'boolean) (defcustom comp-native-driver-options nil "Options passed verbatim to the native compiler's backend driver. @@ -142,11 +133,10 @@ affecting the assembler and linker are likely to be useful. Passing these options is only available in libgccjit version 9 and above." - :type 'list - :group 'comp) + :type 'list) (defvar comp-dry-run nil - "When non-nil run everything but the C back-end.") + "If non-nil, run everything but the C back-end.") (defconst comp-valid-source-re (rx ".el" (? ".gz") eos) "Regexp to match filename of valid input source files.") @@ -594,7 +584,7 @@ In use by the backend." (defun comp-ensure-native-compiler () "Make sure Emacs has native compiler support and libgccjit is loadable. -Raise an error otherwise. +Signal an error otherwise. To be used by all entry points." (cond ((null (featurep 'nativecomp)) @@ -774,7 +764,7 @@ Assume allocation class 'd-default as default." (,(rx-to-string `(seq "(" (group-n 1 (or ,@(mapcar #'symbol-name comp-limple-ops))))) (1 font-lock-keyword-face))) - "Highlights used by comp-limple-mode.") + "Highlights used by `comp-limple-mode'.") (define-derived-mode comp-limple-mode fundamental-mode "LIMPLE" "Syntax-highlight LIMPLE IR." @@ -1260,8 +1250,7 @@ If DST-N is specified use it otherwise assume it to be the current slot." (defun comp-make-curr-block (block-name entry-sp &optional addr) "Create a basic block with BLOCK-NAME and set it as current block. ENTRY-SP is the sp value when entering. -The block is added to the current function. -The block is returned." +Add block to the current function and return it." (let ((bb (make--comp-block-lap addr entry-sp block-name))) (setf (comp-limplify-curr-block comp-pass) bb (comp-limplify-pc comp-pass) addr |