summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/comp.el
Commit message (Collapse)AuthorAgeFilesLines
* ; * lisp/emacs-lisp/comp.el: Fix typos. Add LocalWords.Stefan Kangas2021-04-271-21/+24
|
* Doc fixes for comp.elGlenn Morris2021-04-261-6/+6
| | | | | | * lisp/emacs-lisp/comp.el (comp-deferred-compilation-deny-list) (comp-bootstrap-deny-list, comp-pred-to-cstr, make-comp-mvar) (comp-mvar-used-p, comp-async-compilation): Doc fixes.
* Fix some custom types in comp.elGlenn Morris2021-04-261-5/+5
| | | | | | | * lisp/emacs-lisp/comp.el (comp-deferred-compilation-deny-list) (comp-bootstrap-deny-list, comp-never-optimize-functions) (comp-async-env-modifier-form, comp-native-driver-options): Fix :type (`list' on its own isn't even a valid type).
* Rename abnormal hook to comp-async-cu-done-functionsStefan Kangas2021-04-271-6/+5
| | | | | | * lisp/emacs-lisp/comp.el (comp-async-cu-done-functions): Rename from 'comp-async-cu-done-hook' to reflect that it is an abnormal hook. Doc fix and update single caller.
* Rework where `comp-ctxt' is defined.Andrea Corallo2021-04-261-2/+0
| | | | | | | * test/lisp/emacs-lisp/comp-cstr-tests.el (comp-ctxt): Remove `comp-ctxt' definition. * lisp/emacs-lisp/comp.el (comp-ctxt): Likewise. * lisp/emacs-lisp/comp-cstr.el (comp-ctxt): Define it here.
* * lisp/emacs-lisp/comp.el: Make it loadable in vanilla builds (bug#48021).Andrea Corallo2021-04-261-0/+2
|
* * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Fix string-search.Andrea Corallo2021-04-261-1/+1
|
* * lisp/emacs-lisp/comp.el (comp-accept-and-process-async-output): Fix regexp.Andrea Corallo2021-04-261-1/+1
|
* ; Add 2021 to copyright yearsGlenn Morris2021-04-251-2/+1
|
* * lisp/emacs-lisp/comp.el (no-native-compile): Minor doc fixes.Stefan Kangas2021-04-251-7/+6
|
* * lisp/emacs-lisp/comp.el (comp-imm-equal-test): Style fix.Andrea Corallo2021-04-211-2/+1
|
* * lisp/emacs-lisp/comp.el (batch-byte-native-compile-for-bootstrap): Fix typo.Andrea Corallo2021-04-211-1/+1
|
* Fix native compiler string hash consing strategy (bug#47868)Andrea Corallo2021-04-211-34/+38
| | | | | | | | | | | * test/src/comp-tests.el (comp-test-47868-1): Add new test. * test/src/comp-test-funcs.el (comp-test-47868-1-f) (comp-test-47868-2-f): New functions. * lisp/emacs-lisp/comp.el (comp-imm-equal-test): Define new hash tanble test. (comp-data-container): Use it. (comp-final, comp-run-async-workers): have comp required before reading dumped hashes so that `comp-imm-equal-test' is defined.
* * lisp/emacs-lisp/comp.el (comp-effective-async-max-jobs): Handle BSD.Ashish SHUKLA2021-04-161-0/+3
|
* * Improve some docstring in comp.elAndrea Corallo2021-04-071-6/+13
| | | | | | * lisp/emacs-lisp/comp.el (comp--native-compile) (batch-native-compile, batch-byte-native-compile-for-bootstrap): Improve docstring.
* * lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs.Andrea Corallo2021-04-041-2/+5
|
* Issue a warning when eln look-up fails due to missing .el source file.Andrea Corallo2021-04-011-0/+7
| | | | | | | | | * lisp/emacs-lisp/comp.el (comp-warning-on-missing-source): New customize. * src/lread.c (maybe_swap_for_eln): Issue a warning when eln look-up fails due to missing .el source file. * src/comp.c (syms_of_comp): Define 'Qcomp_warning_on_missing_source'.
* * lisp/emacs-lisp/comp.el (comp-final): Clean-up temporary file.Andrea Corallo2021-03-311-1/+3
|
* Rework native compilation `comp-debug' (bug#46495)Andrea Corallo2021-03-311-6/+6
| | | | | | | * lisp/emacs-lisp/comp.el (comp-debug): Update docstring and move default on Windows systems from 0 to 1. * src/comp.c (Fcomp__compile_ctxt_to_file): Tweak debug levels.
* * lisp/emacs-lisp/comp.el (comp-debug): Fix docstring.Andrea Corallo2021-03-311-2/+2
|
* Improve two native compiler related docstrings.Andrea Corallo2021-03-241-1/+1
| | | | | * lisp/emacs-lisp/comp.el (comp-eln-load-path-eff): Improve docstring. * src/comp.c (comp-eln-load-path): Likewise.
* * lisp/emacs-lisp/comp.el (comp-lookup-eln): Add autoload cookie.Andrea Corallo2021-03-211-0/+1
|
* * lisp/emacs-lisp/comp.el (comp-lookup-eln): Add new function.Andrea Corallo2021-03-211-0/+14
|
* Revert "* lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all..."Andrea Corallo2021-03-211-5/+2
| | | | | | This reverts commit be22cda7be9e77e67f224f6f07cca9dd44aaa078. Older binaries might still need those .eln if they where preloaded.
* ; Remove two unnecessary quotesAndrea Corallo2021-03-211-1/+1
| | | | | | * lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): Remove unnecessary quote. * lisp/emacs-lisp/comp.el (comp-compile-ctxt-to-file): Likewise.
* * lisp/emacs-lisp/comp.el (comp-clean-up-stale-eln): Clean-up all .eln dirs.Andrea Corallo2021-03-211-2/+5
|
* Fix `no-byte-compile' native compilation interaction (bug#47169)Andrea Corallo2021-03-161-1/+2
| | | | | | | * lisp/emacs-lisp/comp.el (comp-spill-lap-function): Throw no-native-compile when `byte-native-qualities' are null. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): No need to consider `no-byte-compile'.
* Have `no-byte-compile' implies also `no-native-compile'.Andrea Corallo2021-03-161-0/+2
| | | | | | * lisp/emacs-lisp/comp.el (no-native-compile): Update doctring. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): when `no-byte-compile' is set to non-nil it overrides this.
* Prefer expand-file-name to concat in native-compilation codeEli Zaretskii2021-03-151-3/+3
| | | | | | | * lisp/emacs-lisp/comp.el (comp-eln-load-path-eff): * src/comp.c (Fcomp_el_to_eln_filename) (eln_load_path_final_clean_up): Prefer expand-file-name to concat. (Bug#43725)
* Fix some entry in `comp-known-type-specifiers' (bug#46847)Andrea Corallo2021-03-141-8/+8
| | | | | | * lisp/emacs-lisp/comp.el (comp-known-type-specifiers): Some fix. * test/src/comp-tests.el (comp-tests-46670-1): Update test.
* * Fix circular dependecy when loading a modified comp.el (bug#47049)Andrea Corallo2021-03-121-14/+17
| | | | | * lisp/emacs-lisp/comp.el (comp-subr-trampoline-install): Move it before other functional code.
* Implement `no-native-compile' (bug#46983)Andrea Corallo2021-03-121-43/+54
| | | | | | | | | | | * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Capture `no-native-compile'. * lisp/emacs-lisp/comp.el (no-native-compile): Define new variable. (comp-spill-lap-function): Throw when `no-native-compile' was captured non-nil. (comp--native-compile): Catch `no-native-compile' if necessary and return nil in case.
* * Fix error reporting for async native compilation (bug#47024)Andrea Corallo2021-03-121-5/+17
| | | | | | * lisp/emacs-lisp/comp.el (comp--native-compile): During async compilation if we catch an error print it in a parsable way so we can report it to the user.
* * Fix truncated warnings (bug#47024)Andrea Corallo2021-03-101-1/+2
| | | | | * lisp/emacs-lisp/comp.el (comp-run-async-workers): Bind `warning-fill-column' to `most-positive-fixnum'.
* Use `length=' and family where possible in native comp codeAndrea Corallo2021-03-071-3/+3
| | | | | | | | * lisp/emacs-lisp/comp-cstr.el (comp-intersect-typesets) (comp-cstr-imm): Use Use `length=' and family where possible. * lisp/emacs-lisp/comp.el (comp-add-cond-cstrs-target-block) (comp-compute-dominator-frontiers) (batch-byte-native-compile-for-bootstrap): Likewise.
* * lisp/emacs-lisp/comp.el (w32-get-nproc): Suppress warning declaring it.Andrea Corallo2021-03-071-0/+1
| | | | For non Windows system.
* Allow for `comp-native-driver-options' to work as a file-local variable.Andrea Corallo2021-03-071-0/+4
|
* Use MS-Windows system APIs to get number of processorsEli Zaretskii2021-03-071-2/+1
| | | | | | | | | | | * lisp/emacs-lisp/comp.el: Use 'w32-get-nproc' instead of the environment variable NUMBER_OF_PROCESSORS. * src/w32proc.c (Fw32_get_nproc): New primitive. * src/w32.c (w32_get_nproc): New function. (sample_system_load): Call w32_get_nproc to initialize the number of processors on this system. * src/w32.h (w32_get_nproc): Add prototype.
* Fix miscompilation of funcall forms in some cases (bug#46974)Pip Cet2021-03-061-2/+4
| | | | | | * lisp/emacs-lisp/comp.el (comp-call-optim-func): Call comp-cstr-imm-vld-p before relying on comp-cstr-imm to return the right value.
* * lisp/emacs-lisp/comp.el (comp-add-cond-cstrs-simple): Suppress warning.Andrea Corallo2021-03-061-2/+1
|
* Fix typos and doc strings in native-compilation filesEli Zaretskii2021-03-041-103/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/comp.el (comp-speed, comp-debug, comp-verbose) (comp-always-compile, comp-deferred-compilation-deny-list) (comp-bootstrap-deny-list, comp-never-optimize-functions) (comp-async-jobs-number, comp-async-cu-done-hook) (comp-async-all-done-hook, comp-async-env-modifier-form) (comp-pass, comp-native-compiling, comp-post-pass-hooks) (comp-known-predicate-p, comp-pred-to-cstr) (comp-symbol-values-optimizable, comp-limple-assignments) (comp-limple-calls, comp-limple-branches, comp-block) (comp-vec--verify-idx, comp-vec-aref, comp-vec-append) (comp-vec-prepend, comp-block-preds) (comp-ensure-native-compiler, comp-log, comp-log-func) (comp-loop-insn-in-block, comp-byte-frame-size) (comp-add-func-to-ctxt, comp-spill-lap-function, comp-spill-lap) (comp-lap-fall-through-p, comp-new-frame, comp-emit-set-call) (comp-copy-slot, comp-latch-make-fill, comp-emit-cond-jump) (comp-body-eff, comp-op-case, comp-prepare-args-for-top-level) (comp-limplify-top-level, comp-negate-arithm-cmp-fun) (comp-emit-assume, comp-cond-cstrs-target-mvar) (comp-function-foldable-p, comp-function-call-maybe-fold) (comp-form-tco-call-seq, comp-clean-up-stale-eln) (comp-delete-or-replace-file, comp--native-compile) (native--compile-async, native-compile) (batch-byte-native-compile-for-bootstrap): Fix typos, wording, and punctuation in doc strings. * lisp/loadup.el: Fix typos. * src/lread.c (syms_of_lread): Doc fix.
* Fix `eql' `equal' propagation of non hash consed values (bug#46843)Andrea Corallo2021-03-011-5/+10
| | | | | | | | | | | | | | | | | | | | | | Extend assumes allowing the following form: (assume dst (and-nhc src1 src2)) `and-nhc' assume operator allow for constraining correctly intersections where non hash consed values are not propagated as values but rather promoted to their types. * lisp/emacs-lisp/comp-cstr.el (comp-cstr-intersection-no-hashcons): New function. * lisp/emacs-lisp/comp.el (comp-emit-assume): Logic update to emit `and-nhc' operator (implemented in fwprop by `comp-cstr-intersection-no-hashcons'). (comp-add-cond-cstrs): Map `eq' to `and' assume operator and `equal' `eql' into `and-nhc'. (comp-fwprop-insn): Update to handle `and-nhc'. * test/src/comp-tests.el (comp-tests-type-spec-tests): Add two tests covering `eql' and `equal' propagation of non hash consed values.
* Don't treat '=' as simple equality emitting constraints (bug#46812)Andrea Corallo2021-02-281-15/+22
| | | | | | | | | | | | | | | | | | | Extend assumes allowing the following form (assume dst (= src1 src2)) to caputure '=' semanting during fwprop handling float integer conversions. * lisp/emacs-lisp/comp.el (comp-equality-fun-p): Don't treat '=' as simple equality. (comp-arithm-cmp-fun-p, comp-negate-arithm-cmp-fun) (comp-reverse-arithm-fun): Rename and add '=' '!='. (comp-emit-assume, comp-add-cond-cstrs, comp-fwprop-insn): Update for new function nameing and to handle '='. * lisp/emacs-lisp/comp-cstr.el (comp-cstr-=): New function. * test/src/comp-tests.el (comp-tests-type-spec-tests): Add a bunch of '=' specific tests.
* Migrate and rename a bunch of functions from comp.el to comp-cstr.elAndrea Corallo2021-02-281-83/+17
| | | | | | | | | | | | | | * lisp/emacs-lisp/comp-cstr.el (comp-cstr-imm-vld-p) (comp-cstr-imm, comp-cstr-fixnum-p, comp-cstr-symbol-p) (comp-cstr-cons-p): Move and rename from 'comp.el'. * lisp/emacs-lisp/comp.el (comp-mvar-type-hint-match-p) (make-comp-mvar, comp-emit-assume, comp-fwprop-prologue) (comp-function-foldable-p, comp-function-call-maybe-fold) (comp-fwprop-call, comp-fwprop-insn, comp-call-optim-func) (comp-compute-function-type): Update for renamed functions. * src/comp.c (emit_mvar_rval): Likewise. * test/src/comp-tests.el (comp-tests-mentioned-p-1) (comp-tests-cond-rw-checker-val): Likewise.
* Make some defcustom types stricter in comp.elStefan Kangas2021-02-261-6/+9
| | | | | | * lisp/emacs-lisp/comp.el (comp-speed, comp-debug, comp-verbose) (comp-async-jobs-number, comp-async-env-modifier-form): Use stricter types.
* Add :version tags to defcustoms in comp.elStefan Kangas2021-02-261-15/+28
| | | | | | | | | * lisp/emacs-lisp/comp.el (comp-speed, comp-debug, comp-verbose) (comp-never-optimize-functions, comp-async-jobs-number) (comp-async-cu-done-hook, comp-async-all-done-hook) (comp-async-env-modifier-form) (comp-async-report-warnings-errors, comp-native-driver-options) (comp-libgccjit-reproducer): Add :version tags.
* Fix last changeEli Zaretskii2021-02-261-10/+12
| | | | | * lisp/emacs-lisp/comp.el (comp-async-report-warnings-errors): Improve wording of the doc string.
* * Improve `comp-async-report-warnings-errors' docstringAndrea Corallo2021-02-261-1/+12
| | | | | * lisp/emacs-lisp/comp.el (comp-async-report-warnings-errors): Improve docstring.
* Improve documentation of last changeEli Zaretskii2021-02-261-2/+6
| | | | | * lisp/emacs-lisp/comp.el (comp-async-query-on-exit) (comp-async-report-warnings-errors): Improve wording.
* * Add `comp-async-query-on-exit' customize.Andrea Corallo2021-02-261-1/+6
| | | | | * lisp/emacs-lisp/comp.el (comp-async-query-on-exit): New customize. (comp-run-async-workers): Make use of.