1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-31 03:03:35 -07:00
Commit graph

187904 commits

Author SHA1 Message Date
Pip Cet
5ea3201dca [MPS] Use xmalloc to allocate 'bc_thread_state' struct
This struct cannot live in MPS-managed memory because it's required
for scanning the bytecode stack.

* src/bytecode.c (free_bc_thread) [MPS]: Free bytecode structure.
(Finternal_stack_stats, exec_byte_code):
* src/igc.c (scan_bc): Adjust.
(root_create_bc): Save 'bc' pointer.
* src/lisp.h (get_act_rec, set_act_rec):
* src/thread.c (mark_one_thread, finalize_one_thread): Adjust.
(Fmake_thread) [MPS]:
(init_threads) [MPS]: Allocate bytecode structure.
* src/thread.h (struct thread_state): Turn 'bc' member into a
pointer (MPS) or single-member array.
2025-10-13 18:25:19 +00:00
Pip Cet
e335e9a254 ; Fix build with --enable-checking=all 2025-10-13 15:21:13 +00:00
Gerd Möllmann
1a68d9909f Replace AMS pool for immovable objects (bug#79584)
This replaces the AMS pool with an AMC pool + pinning.

* src/igc.c (struct igc_pins): New.
(struct igc): Add member pins.
(pin, unpin, amke_pins, count_pins, enlarge_pins): New
functions.
(make_fake_entry_pins): New function.
(Figc_info): Use make_fake_entry_pins.
(igc_thread_remove): Unpin thread_state.
(igc_alloc_global_ref): Pin allocated global ref.
(igc_free_global_ref): New function.
(make_pool_ams): Remove.
(make_igc): Make immovable pool and AMC pool.
* src/igc.h (igc_free_global_ref): Declare.
* src/emacs-module.c (module_free_global_ref): Call
igc_free_global_ref.
* src/lisp.h (struct thread_state): Add member pin_index.
* src/thread.h (GCALIGNED_STRUCT): Add member pin_index.
* src/igc.c
2025-10-13 05:22:22 +02:00
Pip Cet
742a2c6f2f ; * (src/igc.c): Follow Emacs coding style (space after a cast) 2025-10-12 08:22:53 +00:00
Helmut Eller
0028b33d23 Recognize some Amd64 instruction patterns
* mps/code/prmci6.c (IsSimpleMov): Actually do something.
(IsRexPrefix, DecodeSimpleMov, RexR, RexB, RexX, DecodeDisp32)
(SignedInsElt, RegValue, DecodeModRM, DecodeSIB, DecodeCB): New helpers.
* mps/code/prmctest.c: New file.
* mps/code/comm.gmk: Add prmctest.
* mps/tool/testcases.txt: Here too.
2025-10-11 20:33:40 +02:00
Helmut Eller
58a9768528 Ignore dangling-pointer warning
* mps/code/ss.c (StackHot): [MPS_BUILD_GC]: On more platforms, not only
__MINGW32__.
2025-10-11 20:18:34 +02:00
Helmut Eller
f0eaa4ff78 * mps/code/poolawl.c (AWL0Init): Stick to C89. 2025-10-11 20:15:09 +02:00
Pip Cet
76218666a0 Ignore partial words when creating ambiguous roots (bug#79598)
* src/igc.c (word_aligned): New function.
(root_create_ambig): Cover only complete words.
2025-10-11 20:13:32 +02:00
Helmut Eller
df88bd5771 Revert "Expand main_thread_getcjmp to word bounds (bug#79598)"
This reverts commit 215e0ffaf3.
2025-10-11 20:12:40 +02:00
Eli Zaretskii
d8e1669b3f ; * mps/code/arenacv.c (TEST_ARENA_SIZE): Fix a typo. 2025-10-10 10:01:44 +03:00
Helmut Eller
595baf8e4c Use the AWL0 pool for marker vectors
* src/igc.c (make_pool_awl0): New function.
(make_igc): Use it.
2025-10-09 20:17:36 +02:00
Helmut Eller
9d81d966a6 Implement an experimental AWL0 pool
Mostly boilerplate code to override the SegAccess method of AWLSeg.

* mps/code/poolawl.c (AWL0Pool, AWL0Seg): New classes.
(awl0SegAccess, awl0BufferFill): New methods.
2025-10-09 18:32:21 +02:00
Helmut Eller
215e0ffaf3 Expand main_thread_getcjmp to word bounds (bug#79598)
On MacOS/x86_64, sizeof (sys_jmp_buf) == 148.  We can't create a root
for this size because MPS requires word aligned sizes.

* src/thread.c (main_thread_getcjmp): Use GCALIGNED_STRUCT attribute.
* src/igc.c (root_create_main_thread): Round the size of the jumpbuf up
to GCALIGNMENT.
2025-10-09 17:23:08 +02:00
Ken Brown
b57067e8a0 Support the Cygwin build of MPS
* mps/code/prmccyi6.c:
* mps/code/cyi6gc.gmk: New files, for the Cygwin build.

* mps/code/config.h:
* mps/code/lockix.c:
* mps/code/prmcix.c:
* mps/code/protix.c:
* mps/code/protsgix.c:
* mps/code/pthrdext.c:
* mps/code/testthr.h:
* mps/code/thix.c:
* mps/code/vmix.c: Port to Cygwin.

* mps/configure.ac (x86_64-*-cygwin*/no): Add definitions for
Cygwin.

* mps/code/mps.c [MPS_PF_CYI6GC]:
* mps/code/mpstd.h: Define 64-bit Cygwin stuff.

* mps/code/gcbench.c: [MPS_OS_CY]:
* mps/code/djbench.c [MPS_OS_CY]: Include alloca.h.

* mps/code/arenacv.c (TEST_ARENA_SIZE) [MPS_OS_CY]: Increase to
make test pass.  (Bug#74805)

* mps/code/arenavm.c (VMArenaCreate): Avoid compiler warning.
2025-10-08 10:33:45 -04:00
Helmut Eller
380057b6b3 Remove the closure argument from dflt_scan_obj
The closure argument is only needed for mps_pool_walk.  Without it,
dflt_scan_obj can be a bit simpler and faster.

* src/igc.c (dflt_scan_obj): Remove the closure argument.
(dflt_scanx): Call collect_stats here.
(dflt_scan): Expand the loop here and drop the NULL argument.
2025-10-05 18:35:58 +02:00
Helmut Eller
20a02d0755 * src/igc.c (Figc_info): Remove pragma.
Apparently the GCC diagnostic ignored "-Wsuggest-attribute=noreturn"
pragma is no longer needed.
2025-10-05 16:27:10 +02:00
Helmut Eller
146a2d4faf Simplify igc--format-bytes-human-readable
Suggested by Pip Cet.

* lisp/emacs-lisp/igc.el (igc--format-bytes-human-readable): Use
file-size-human-readable.
2025-10-04 20:54:19 +02:00
Eli Zaretskii
051b4e6d74 Implement 'igc--describe-arena' without 'open_memstream'
*src/igc.c (Figc__describe_arena) [!HAVE_OPEN_MEMSTREAM]:
Implementation for platforms that don't have 'open_memstream'.
(syms_of_igc): Always defsubr 'Sigc__describe_arena'.
2025-10-04 19:57:49 +03:00
Eli Zaretskii
db34f7877b ; Unbreak the MS-Windows build
* src/igc.c (syms_of_igc): Defsubr 'Sigc__describe_arena' only if
HAVE_OPEN_MEMSTREAM is defined.
2025-10-04 19:05:27 +03:00
Helmut Eller
79873ad156 Remove EMACS_IGC_PAUSE_TIME and EMACS_IGC_COMMIT_LIMIT env vars
Should not be needed as we have igc--set-pause-time and
igc--set-commit-limit functions.

* src/igc.c (read_pause_time, read_commit_limit): Deleted.
(make_arena): Use hard-coded defaults.
2025-10-04 17:47:30 +02:00
Helmut Eller
f9f8ffbb00 Add a igc-describe-arena command
* src/igc.c (Figc__describe_arena): New wrapper for ArenaDescribe.
(syms_of_igc): Register it.
* lisp/emacs-lisp/igc.el (igc-describe-arena): New command.
2025-10-04 17:33:10 +02:00
Helmut Eller
98e1b11f16 Merge branch 'master' into feature/igc 2025-10-04 16:41:45 +02:00
Helmut Eller
c5f80fa076 Minor optimization
* lisp/emacs-lisp/igc.el (igc--format-bytes-human-readable): Avoid some
consing.
2025-10-04 16:40:01 +02:00
Eli Zaretskii
5ee1e205e1 ; Improve the documentation of the last commit
* lisp/vc/log-view.el (log-view-copy-revision-as-kill):
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Improve wording of last commit.  (Bug#79493)
2025-10-04 17:18:12 +03:00
Sean Whitton
d0c63b8427 Improve log-view-copy-revision-as-kill
* lisp/vc/log-view.el (log-view-copy-revision-as-kill): Signal
user-error if there is no revision at point.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Shorten docs for the new command.
2025-10-04 14:41:16 +01:00
Timo Myyrä
2ce33b66c5 New command log-view-copy-revision-as-kill
* lisp/vc/log-view.el (log-view-copy-revision-as-kill): New
command.
(log-view-mode-map): Bind it.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document it.
2025-10-04 14:40:03 +01:00
Elías Gabriel Pérez
3271d9fc96 hideshow.el: Minor optimizations
* lisp/progmodes/hideshow.el (hs-hideable-region-p): New
function.
(hs--make-indicators-overlays, hs--add-indicators)
(hs-hide-block-at-point, hs-hide-all, hs-hide-block)
(hs-hide-initial-comment-block): Use it.  (Bug#79533)
2025-10-04 11:27:27 +03:00
Augusto Stoffel
b8555ebff4 Add 'auto-mode-alist' entry for Containerfile
* lisp/progmodes/dockerfile-ts-mode.el: Also match Containerfile
and Containerfile.* in the 'auto-mode-alist' entry.  (Bug#79524)
2025-10-04 11:16:37 +03:00
Jeremy Bryant
1b3a8a0099 * lisp/emacs-lisp/igc.el: Add docstrings in stats export functions
(igc--collect-stats-csv, igc--collect-stats-sqlite): Add docstrings.
(Bug#79564)
2025-10-04 10:21:45 +03:00
Stefan Monnier
6a12fe3d79 (editorconfig-indentation-alist): Pare down
* lisp/editorconfig.el (editorconfig-indentation-alist): Remove entries
of the form `(MODE-mode MODE-basic-offset)`, `(MODE-mode
MODE-indent-level)`, or `(MODE-mode MODE-indent-offset)` since they are
covered by the fallback guessing code.
(editorconfig--default-indent-size-function): Remove "-block-offset"
from the guessing code since it's used only by `octave-mode`.
2025-10-03 17:17:02 -04:00
Sean Whitton
9deff2926b New command log-view-unmark-all-entries
* lisp/vc/log-view.el (log-view-unmark-all-entries): New
command.
(log-view-mode-map): Bind it.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document it.
2025-10-03 20:54:25 +01:00
Sean Whitton
70a24e3bb5 Merge from origin/emacs-30
0aa44112b6 ; * doc/emacs/maintaining.texi (VC Change Log): Missing a...
2025-10-03 20:51:18 +01:00
Sean Whitton
2a63811b30 ; Merge from origin/emacs-30
The following commit was skipped:

b0e4e53b9a * lisp/term/w32-win.el (dynamic-library-alist): Add libxm...
2025-10-03 20:51:18 +01:00
Sean Whitton
d5faebe8db Merge from origin/emacs-30
6a8fda1f33 Fix process name matching in 'tramp-process-running-p'
217fd4f09e ; * doc/lispref/modes.texi (Defining Minor Modes): Fix la...
2025-10-03 20:51:18 +01:00
Sean Whitton
a7bb2fa62a ; TRAMP docs: "cherry pick"->"cherry-pick" (see bug#79408). 2025-10-03 20:24:59 +01:00
Helmut Eller
cb036f78e4 Fix igc tests
* test/src/igc-tests.el (set-commit-limit-test): Update for recent
changes.
2025-10-03 21:09:59 +02:00
Helmut Eller
28cfce1da5 Optionally display sizes in human readable format
* lisp/emacs-lisp/igc.el (igc--number-format): New variable.
(igc--format-bytes-human-readable, igc--format-bytes,
igc--format-bytes-cell, igc--format-avg-cell):
(igc--insert-info): Use them
(igc-cycle-number-format): New command.
(igc-stats-mode): Bind it to n.
2025-10-03 20:47:28 +02:00
Helmut Eller
b19eae1d6d * src/igc.c (Figc_info): Simplify pseudo-entries
* src/igc.c (make_fake_entry): New helper
(make_entry): Deleted.
(make_stat_entry): Do what make_entry did.
2025-10-03 17:50:30 +02:00
Helmut Eller
498f306ca6 Display igc-stats more compactly
* lisp/emacs-lisp/igc.el (igc--insert-info-row)
(igc--compute-column-widths, igc--format-cell): New helpers
(igc-stats): Use them.
2025-10-03 17:45:08 +02:00
Sean Whitton
0aa44112b6 ; * doc/emacs/maintaining.texi (VC Change Log): Missing annotations. 2025-10-03 16:01:26 +01:00
Sean Whitton
0134d4c4fd vc--prompt-other-working-tree: Better handle no other working trees
* lisp/vc/vc.el (vc--prompt-other-working-tree): If there are no
other working trees but ALLOW-EMPTY is non-nil, it is not an
error.
2025-10-03 15:32:44 +01:00
Spencer Baugh
3ec87212a4 Eglot: make markup invisible instead of deleting it (bug#79552)
We use gfm-view-mode to render Markdown before we hand over the string
to ElDoc (which usually put it in a 'special' mode "*eldoc*" buffer).
'gfm-view-mode' adds keymap text properties to make links clickable.  It
also makes some of the markup invisible with a special 'invisible'
property value which is specific to 'gfm-view-mode'.  We used to delete
the latter, therefore breaking the link-clicking.  Simply resetting the
regions with non-nil 'invisible' to 't' instead of deleting them fixes
this.  See also https://github.com/joaotavora/eglot/discussions/1238

* lisp/progmodes/eglot.el: Make invisible markup invisible
instead of deleting it.

* etc/EGLOT-NEWS: Mention bugfix.

Co-authored-by: João Távora <joaotavora@gmail.com>
2025-10-03 09:44:56 +01:00
Sean Whitton
72f3f48d36 Log View marking: Fix lambda lists
* lisp/vc/log-view.el (log-view-mark-entry)
(log-view-unmark-entry): Mark ARG as a required argument, as it
in fact is.
(log-view-toggle-mark-entry): Call them properly.
2025-10-02 21:18:51 +01:00
Helmut Eller
bb008a3d31 Refactor Figc_info a bit
* src.igc (make_stat_entry): New helper.
(Figc_info): Use it.
2025-10-02 22:05:40 +02:00
Helmut Eller
a954f14fc3 Refactor collect_stats a bit more
* src/igc.c (struct igc_stat): Factored out from struct igc_stats.
(collect_stats_1): Factored out from collect_stats.
2025-10-02 21:45:52 +02:00
Helmut Eller
a48c1ba5ac * src/igc.c (make_entry): Use unsigned integers to count bytes.
* test/src/igc-tests.el (set-commit-limit-test): Commit limits are never
negative.
2025-10-02 21:29:53 +02:00
Sean Whitton
b38e54b667 ; * lisp/vc/vc.el (vc-print-root-log): Use plusp. 2025-10-02 20:20:14 +01:00
Helmut Eller
3b34cdd3b6 * src/igc.c (collect_stats): New. Factored out from dflt_scan_obj. 2025-10-02 21:16:29 +02:00
Helmut Eller
3ee3179452 * .clang-format: Use the same ColumnLimit as on master 2025-10-02 20:57:32 +02:00
Helmut Eller
c51e11ed24 * src/pdumper.c (Fdump_emacs_portable): Remove debug printfs. 2025-10-02 20:51:16 +02:00