diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-05-18 20:51:46 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-05-18 21:04:36 +0100 |
commit | 2aec16ab754aa803efd2e23a54485e34a56bf76c (patch) | |
tree | 9d7f3fd04eaf52d89aaf9bdc45cc985909acb7e2 /lisp | |
parent | 2ac619458520f1399088740e5e13751d362e55a0 (diff) | |
download | emacs-2aec16ab754aa803efd2e23a54485e34a56bf76c.tar.gz emacs-2aec16ab754aa803efd2e23a54485e34a56bf76c.tar.bz2 emacs-2aec16ab754aa803efd2e23a54485e34a56bf76c.zip |
* Pacify with the byte-compiler
* lisp/emacs-lisp/comp.el (comp-num-cpus): New special variable.
(comp-effective-async-max-jobs): Make use of `comp-num-cpus'.
(comp-call-optim-form-call): Remove unnecessary parameter.
(comp-call-optim-func): Reflect `comp-call-optim-form-call'
parameter removal.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index f23a0b29afc..f94544877ed 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1964,7 +1964,7 @@ Backward propagate array placement properties." ;; the full compilation unit. ;; For this reason this is triggered only at comp-speed == 3. -(defun comp-call-optim-form-call (callee args self) +(defun comp-call-optim-form-call (callee args) "" (cl-flet ((fill-args (args total) ;; Fill missing args to reach TOTAL @@ -2017,11 +2017,11 @@ Backward propagate array placement properties." do (pcase insn (`(set ,lval (callref funcall ,f . ,rest)) (when-let ((new-form (comp-call-optim-form-call - (comp-mvar-constant f) rest self))) + (comp-mvar-constant f) rest))) (setcar insn-cell `(set ,lval ,new-form)))) (`(callref funcall ,f . ,rest) (when-let ((new-form (comp-call-optim-form-call - (comp-mvar-constant f) rest self))) + (comp-mvar-constant f) rest))) (setcar insn-cell new-form))))))) (defun comp-call-optim (_) @@ -2296,17 +2296,17 @@ processes from `comp-async-compilations'" do (remhash file-name comp-async-compilations)) (hash-table-count comp-async-compilations)) -(let (num-cpus) - (defun comp-effective-async-max-jobs () - "Compute the effective number of async jobs." - (if (zerop comp-async-jobs-number) - (or num-cpus - (setf num-cpus - ;; Half of the CPUs or at least one. - ;; FIXME portable? - (max 1 (/ (string-to-number (shell-command-to-string "nproc")) - 2)))) - comp-async-jobs-number))) +(defvar comp-num-cpus) +(defun comp-effective-async-max-jobs () + "Compute the effective number of async jobs." + (if (zerop comp-async-jobs-number) + (or comp-num-cpus + (setf comp-num-cpus + ;; Half of the CPUs or at least one. + ;; FIXME portable? + (max 1 (/ (string-to-number (shell-command-to-string "nproc")) + 2)))) + comp-async-jobs-number)) (defun comp-run-async-workers () "Start compiling files from `comp-files-queue' asynchronously. |