Commit graph

15 commits

Author SHA1 Message Date
Andrea Corallo
0df28dc00e ; * lisp/emacs-lisp/comp-run.el (comp-run-async-workers): Fix indentation. 2024-03-20 16:59:33 +01:00
Andrea Corallo
0b0c7da8c8 Add native compiler sanitizer
* src/comp.c (ABI_VERSION): Bump new version.
(CALL0I): Uncomment.
(helper_link_table, declare_runtime_imported_funcs): Add
'helper_sanitizer_assert'.
(Fcomp__init_ctxt): Register emitter for
'helper_sanitizer_assert'.
(helper_sanitizer_assert): New function.
(syms_of_comp): 'helper_sanitizer_assert' defsym.
(syms_of_comp): 'comp-sanitizer-error' define error.
(syms_of_comp): 'comp-sanitizer-active' defvar.

* lisp/emacs-lisp/comp.el (comp-passes): Add 'comp--sanitizer'.
(comp-sanitizer-emit): Define var.
(comp--sanitizer): Define function.

* lisp/emacs-lisp/comp-run.el (comp-run-async-workers): Forward
'comp-sanitizer-emit'.
2024-03-20 09:51:10 +01:00
Andrea Corallo
0055362855 * Don't install unnecessary trampolines (bug#69573)
* lisp/emacs-lisp/comp-run.el (comp-subr-trampoline-install):
Check that subr-name actually matches the target subr.
2024-03-15 14:44:22 +01:00
Eli Zaretskii
3923998240 Improve documentation of recent changes in comp-run.el
* lisp/emacs-lisp/comp-run.el
(native-comp-async-warnings-errors-kind): Rename from
'native-comp-async-report-warnings-errors-kind', and rename
'importants' to 'important'; all users changed.  Doc fix.

* etc/NEWS: Announce the new option.
2024-02-29 15:37:19 +02:00
Andrea Corallo
8e5baaddec * Add 'native-comp-async-report-warnings-errors-kind'
* lisp/emacs-lisp/comp-run.el (native-comp-async-report-warnings-errors-kind):
Add new customize.
2024-02-29 11:54:24 +01:00
Andrea Corallo
b8ba3cb7f0 * Improve 'native-comp-async-report-warnings-errors' tag
* lisp/emacs-lisp/comp-run.el (native-comp-async-report-warnings-errors):
Improve tag.
2024-02-29 11:26:08 +01:00
Andrea Corallo
b214cb2843 ; * lisp/emacs-lisp/comp-run.el: Fix typo. 2024-02-21 21:38:11 +01:00
Po Lu
070cb32463 ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
Andrea Corallo
cf11fdfd8e * lisp/emacs-lisp/comp-run.el (bytecomp): Require it (bug#67590) 2023-12-03 22:25:12 +01:00
Andrea Corallo
9c9b87639f Clean-up warnings for non native builds (this time for real)
* lisp/emacs-lisp/comp.el (comp-native-version-dir)
(comp-subr-arities-h, native-comp-eln-load-path)
(native-comp-enable-subr-trampolines): Remove warning.
(comp--compile-ctxt-to-file, comp--init-ctxt, comp--release-ctxt)
(comp-el-to-eln-filename)
(comp-el-to-eln-rel-filename, native-elisp-load): Declare.
* lisp/emacs-lisp/comp-run.el (comp--no-native-compile)
(comp-deferred-pending-h, comp-installed-trampolines-h)
(native-comp-enable-subr-trampolines): Remove warning.
(comp--install-trampoline, comp-el-to-eln-filename)
(native-elisp-load): Declare.
* lisp/emacs-lisp/comp-common.el: Update.
2023-11-09 19:27:34 +01:00
Andrea Corallo
c559f4e368 comp: Add comp-common.el
* lisp/emacs-lisp/comp-common.el: New file.
(comp-common): New group.
(native-comp-verbose, native-comp-never-optimize-functions)
(native-comp-async-env-modifier-form, comp-limple-calls)
(comp-limple-sets, comp-limple-assignments)
(comp-limple-branches, comp-limple-ops)
(comp-limple-lock-keywords, comp-log-buffer-name, comp-log)
(native-comp-limple-mode, comp-log-to-buffer)
(comp-ensure-native-compiler, comp-trampoline-filename)
(comp-eln-load-path-eff): Move here
* lisp/emacs-lisp/comp-run.el (comp-common): Require.
* lisp/emacs-lisp/comp.el (comp-common): Require.
* admin/MAINTAINERS: Add comp-common.el
* lisp/Makefile.in (COMPILE_FIRST): Likewise.
* src/Makefile.in (elnlisp): Likewise.
2023-11-09 12:34:26 +01:00
Andrea Corallo
b2416d2c02 Don't load comp when installing an existing trampoline
* lisp/emacs-lisp/nadvice.el (advice--add-function): Update.
	(comp-subr-trampoline-install): Update src file.
	* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Autoload.
	* lisp/emacs-lisp/comp-run.el (comp-log-buffer-name)
	(native--compile-async, comp-warn-primitives)
	(comp-trampoline-filename, comp-eln-load-path-eff)
	(comp-trampoline-search, comp-trampoline-compile): Move here.
	* lisp/emacs-lisp/advice.el (comp-subr-trampoline-install): Update
	src file.
2023-11-09 12:34:26 +01:00
Andrea Corallo
93cc43a23c comp: don't require 'warnings' in comp-run
* lisp/emacs-lisp/comp-run.el (warnings): Don't require.
(warning-suppress-types): Wave warning.
* lisp/emacs-lisp/warnings.el (warning-suppress-types): Autoload it.
2023-11-09 12:34:26 +01:00
Andrea Corallo
4bb1863567 comp: make comp-run don't require cl-lib at runtime
* lisp/emacs-lisp/comp-run.el (cl-lib): Require it only at compile
time.
(native-compile-async-skip-p): Use 'seq-some'.
(native--compile-async): Don't use 'cl-substitute'.
2023-11-09 12:34:22 +01:00
Andrea Corallo
e6a955d242 comp: split code in comp-run.el
* lisp/emacs-lisp/comp-run.el : New file.
(comp-run)
(native-comp-jit-compilation-deny-list)
(native-comp-async-jobs-number)
(native-comp-async-report-warnings-errors)
(native-comp-always-compile)
(native-comp-async-cu-done-functions)
(native-comp-async-all-done-hook)
(native-comp-async-env-modifier-form)
(native-comp-async-query-on-exit, native-comp-verbose)
(comp-log-buffer-name, comp-async-buffer-name, comp-no-spawn)
(comp-async-compilations, native-comp-limple-mode)
(comp-ensure-native-compiler, native-compile-async-skip-p)
(comp-files-queue, comp-async-compilations, comp-async-runnings)
(comp-num-cpus, comp-effective-async-max-jobs)
(comp-last-scanned-async-output)
(comp-accept-and-process-async-output, comp-valid-source-re)
(comp-run-async-workers, native--compile-async)
(native-compile-async): Move these definitions here.
* lisp/Makefile.in (COMPILE_FIRST): Update.
* src/Makefile.in (elnlisp): Likewise.
* admin/MAINTAINERS: Likewise.
2023-11-09 11:06:06 +01:00