mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Merge from origin/emacs-29
1769a58830Fix some uses of 'use-dialog-box'deef41a825Fix hi-lock-tests when 'use-dialog-box' is non-nil5093a53496Fix regression due to change in face sort order by 'face-...3e74763099* lisp/files.el (file-equal-p): Work around Haiku stat bug.13fd7667f9; * src/treesit.c: Improve sectioning.a40b1745d4(project-vc-backend-markers-alist): Add entry for vc-got18e96ed7c8project.el: Extract backend->marker association for a defvar0a5615669aDon't completely clip into visible range in treesit_recor...5b34fc0708* lisp/treesit.el (treesit-node-at): Update docstring (bu...1c7d762378; Minor copyedit of NEWS wrt *-ts-modes09fad246de* lisp/calc/calc.el (calc-mode): Improve docstring.8aad8d75aa; Improve and update documentation of native compilationd6e4f24372Merge 'emacs-29' into 'feature/inhibit-native-comp-cleanup'a555abc56dFix order of faces in 'face-list'b44a7ff85dAllow 'icon-title-format' to have the value tf1f571e72aAdd electric indent for preproc directives83af806ab7Rename 'emacs-news-toggle-tag' to 'emacs-news-cycle-tag'5bc88b3b17Add menu to news-mode40f4bc4e0a; Avoid installing VC package dependencies multiple times1c9d81a2b4Attempt to recognise if a VC package has no Elisp files2550e8bb0bFix mule-tests under en_US.UTF-8 locale3279530993Move block closer above declaration_list rule (bug#61531)b18754bb17Minor improvements in c-ts-mode and docs3c6b726a7bAdd super node as a keyword1917c51fe6; Prevent ERC-induced false positive in JUnit reportb16965ef7eDelete perplexing paragraph from Gnus manual43c62a4732; Fix typofdac69b45e; Auto-commit of loaddefs files.7678b7e46fEglot: check server capability before sending didSave (bu...a3a1ef7bd5Fix rust-ts-mode type and module highlighting (Bug#61302)477aa047eerust-ts-mode: Highlight variable reassignments5206a551c1Improve backward compatibility of save-restrictionaccd88d554Don't indent template_string contents (bug#61503)d97a383996csharp-ts-mode: fontify compiler directives (bug#61512)420d2cae84Update to Transient v0.3.7-209-gdab1dfaa3751b5d0c; Raise an error if a VC package checkout is empty6a32ba8b69; Fix the installation of dependencies for VC packages4eac80fcc3; Prepare to update ERC version to 5.54f099a7217; Remove failing erc-reuse-buffers testce4a066ed1* Generate trampolines in a temporary directory if no oth...4bb27a5ca9; Minor docs copyedits13bcff3da5Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...3d572ae0d5Rename with/without-narrowing to with/without-restrictiond806b0e33c* lisp/repeat.el: Rename internal function and variable (...1a64f326e0* Fix previous change95692f6754Rename native-comp-deferred-compilation-deny-list8d8464bd5aRename native-comp-deferred-compilation into native-comp-...5d0912f144Rename comp-enable-subr-trampolines into native-comp-enab...dd8b720ee7; * etc/NEWS: Fix typos.909bd04cf5; * lisp/calendar/lunar.el: Add comments. (bug#61460)10f2aedea9; * lisp/progmodes/c-ts-mode.el (c-ts-base-mode): delete ...abfd00e5c0* lisp/emacs-lisp/comp.el (native-comp-never-optimize-fun...1795839babSupport `comp-enable-subr-trampolines' as string value865758130a; * admin/git-bisect-start: Update failing commitsb948d0d7efMerge branch 'scratch/fix-locked-narrowing'b6e2799aa1* Some more `inhibit-native-compile' clean-updcb2379a46Minor improvements to labeled narrowingc0681cd347Revert "Add new variable 'inhibit-native-compilation'"3969a34fa1Revert "Rename to inhibit-automatic-native-compilation"4297039bd1Save and restore the absence of narrowing locks2956e54b1dAdd an extensive test for labeled (locked) narrowing79ce185ad1Update the documentation about labeled (locked) narrowinga6cd4553d4Rename two long line optimizations variables0d73e4aa26Add specific symbols for narrowingsd8438e2bb4Add 'without-narrowing' macro97314447e6Make 'narrowing-lock' and 'narrowing-unlock' internala4aa32bdffFix 'save-restriction' for narrowing locks
This commit is contained in:
commit
0be5f7ab63
21 changed files with 364 additions and 223 deletions
|
|
@ -85,13 +85,17 @@ This is intended for debugging the compiler itself.
|
|||
:type 'boolean
|
||||
:version "28.1")
|
||||
|
||||
(defcustom native-comp-deferred-compilation-deny-list
|
||||
(defcustom native-comp-jit-compilation-deny-list
|
||||
'()
|
||||
"List of regexps to exclude matching files from deferred native compilation.
|
||||
Files whose names match any regexp are excluded from native compilation."
|
||||
:type '(repeat regexp)
|
||||
:version "28.1")
|
||||
|
||||
(make-obsolete-variable 'native-comp-deferred-compilation-deny-list
|
||||
'native-comp-jit-compilation-deny-list
|
||||
"29.1")
|
||||
|
||||
(defcustom native-comp-bootstrap-deny-list
|
||||
'()
|
||||
"List of regexps to exclude files from native compilation during bootstrap.
|
||||
|
|
@ -105,7 +109,11 @@ during bootstrap."
|
|||
;; correctly (see comment in `advice--add-function'). DO NOT
|
||||
;; REMOVE.
|
||||
macroexpand rename-buffer)
|
||||
"Primitive functions to exclude from trampoline optimization."
|
||||
"Primitive functions to exclude from trampoline optimization.
|
||||
|
||||
Primitive functions included in this list will not be called
|
||||
directly by the natively-compiled code, which makes trampolines for
|
||||
those primitives unnecessary in case of function redefinition/advice."
|
||||
:type '(repeat symbol)
|
||||
:version "28.1")
|
||||
|
||||
|
|
@ -695,7 +703,7 @@ Useful to hook into pass checkers.")
|
|||
;;;###autoload
|
||||
(defun comp-subr-trampoline-install (subr-name)
|
||||
"Make SUBR-NAME effectively advice-able when called from native code."
|
||||
(unless (or (null comp-enable-subr-trampolines)
|
||||
(unless (or (null native-comp-enable-subr-trampolines)
|
||||
(memq subr-name native-comp-never-optimize-functions)
|
||||
(gethash subr-name comp-installed-trampolines-h))
|
||||
(cl-assert (subr-primitive-p (symbol-function subr-name)))
|
||||
|
|
@ -3782,6 +3790,32 @@ Return the trampoline if found or nil otherwise."
|
|||
when (file-exists-p filename)
|
||||
do (cl-return (native-elisp-load filename))))
|
||||
|
||||
(defun comp--trampoline-abs-filename (subr-name)
|
||||
"Return the absolute filename for a trampoline for SUBR-NAME."
|
||||
(cl-loop
|
||||
with dirs = (if (stringp native-comp-enable-subr-trampolines)
|
||||
(list native-comp-enable-subr-trampolines)
|
||||
(if native-compile-target-directory
|
||||
(list (expand-file-name comp-native-version-dir
|
||||
native-compile-target-directory))
|
||||
(comp-eln-load-path-eff)))
|
||||
with rel-filename = (comp-trampoline-filename subr-name)
|
||||
for dir in dirs
|
||||
for abs-filename = (expand-file-name rel-filename dir)
|
||||
unless (file-exists-p dir)
|
||||
do (ignore-errors
|
||||
(make-directory dir t)
|
||||
(cl-return abs-filename))
|
||||
when (file-writable-p abs-filename)
|
||||
do (cl-return abs-filename)
|
||||
;; Default to some temporary directory if no better option was
|
||||
;; found.
|
||||
finally (cl-return
|
||||
(expand-file-name
|
||||
(make-temp-file-internal (file-name-sans-extension rel-filename)
|
||||
0 ".eln" nil)
|
||||
temporary-file-directory))))
|
||||
|
||||
(defun comp-trampoline-compile (subr-name)
|
||||
"Synthesize compile and return a trampoline for SUBR-NAME."
|
||||
(let* ((lambda-list (comp-make-lambda-list-from-subr
|
||||
|
|
@ -3803,25 +3837,7 @@ Return the trampoline if found or nil otherwise."
|
|||
(lexical-binding t))
|
||||
(comp--native-compile
|
||||
form nil
|
||||
;; If we've disabled nativecomp, don't write the trampolines to
|
||||
;; the eln cache (but create them).
|
||||
(unless inhibit-automatic-native-compilation
|
||||
(cl-loop
|
||||
for dir in (if native-compile-target-directory
|
||||
(list (expand-file-name comp-native-version-dir
|
||||
native-compile-target-directory))
|
||||
(comp-eln-load-path-eff))
|
||||
for f = (expand-file-name
|
||||
(comp-trampoline-filename subr-name)
|
||||
dir)
|
||||
unless (file-exists-p dir)
|
||||
do (ignore-errors
|
||||
(make-directory dir t)
|
||||
(cl-return f))
|
||||
when (file-writable-p f)
|
||||
do (cl-return f)
|
||||
finally (error "Cannot find suitable directory for output in \
|
||||
`native-comp-eln-load-path'"))))))
|
||||
(comp--trampoline-abs-filename subr-name))))
|
||||
|
||||
|
||||
;; Some entry point support code.
|
||||
|
|
@ -4110,14 +4126,12 @@ the deferred compilation mechanism."
|
|||
data
|
||||
;; So we return the compiled function.
|
||||
(native-elisp-load data)))
|
||||
;; We may have created a temporary file when we're being
|
||||
;; called with something other than a file as the argument.
|
||||
;; Delete it if we can.
|
||||
(when (and (not (stringp function-or-file))
|
||||
(not output)
|
||||
comp-ctxt
|
||||
(comp-ctxt-output comp-ctxt)
|
||||
(file-exists-p (comp-ctxt-output comp-ctxt)))
|
||||
;; NOTE: Not sure if we want to remove this or being cautious.
|
||||
(cond ((eq 'windows-nt system-type)
|
||||
;; We may still be using the temporary .eln file.
|
||||
(ignore-errors (delete-file (comp-ctxt-output comp-ctxt))))
|
||||
|
|
@ -4137,11 +4151,11 @@ LOAD and SELECTOR work as described in `native--compile-async'."
|
|||
(t (error "SELECTOR must be a function a regexp or nil")))
|
||||
;; Also exclude files from deferred compilation if
|
||||
;; any of the regexps in
|
||||
;; `native-comp-deferred-compilation-deny-list' matches.
|
||||
;; `native-comp-jit-compilation-deny-list' matches.
|
||||
(and (eq load 'late)
|
||||
(cl-some (lambda (re)
|
||||
(string-match-p re file))
|
||||
native-comp-deferred-compilation-deny-list))))
|
||||
native-comp-jit-compilation-deny-list))))
|
||||
|
||||
(defun native--compile-async (files &optional recursively load selector)
|
||||
;; BEWARE, this function is also called directly from C.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue