summaryrefslogtreecommitdiff
path: root/src/keyboard.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-09-05 12:13:32 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-09-05 12:15:14 -0700
commit6cf62141c4467314f67c2ef75a4bf94d41ff050f (patch)
tree15e690c820576893cb9ca5d3f2dd1455dd3f0520 /src/keyboard.c
parent940ea1549117f56642fd6830bdbccf8865a932bb (diff)
downloademacs-6cf62141c4467314f67c2ef75a4bf94d41ff050f.tar.gz
emacs-6cf62141c4467314f67c2ef75a4bf94d41ff050f.tar.bz2
emacs-6cf62141c4467314f67c2ef75a4bf94d41ff050f.zip
Reinstall recent GC-related changes
The report that they broke macOS was a false alarm, as the previous commit was also broken (Bug#43152#62). * src/alloc.c (live_string_holding, live_cons_holding) (live_symbol_holding): Count only pointers that point to a struct component, or are a tagged pointer to the start of the struct. Exception: for non-bool-vector pseudovectors, count any pointer past the header, since it’s too much of a pain to write code for every pseudovector. (live_float_holding, live_vector_pointer): New functions, which are similar about counting pointers. (live_float_p, live_large_vector_holding) (live_small_vector_pointer, mark_maybe_pointer): Use them. (mark_maybe_object, mark_maybe_objects): Remove, and remove all callers; mark_maybe_pointer now suffices. (mark_objects): New function. * src/alloc.c (mark_vectorlike, mark_face_cache): * src/eval.c (mark_specpdl): * src/fringe.c (mark_fringe_data): * src/keyboard.c (mark_kboards): Simplify by using mark_objects. * src/lisp.h (SAFE_ALLOCA_LISP_EXTRA): Clear any Lisp_Object arrays large enough to not fit into the stack, so that GC need not worry about whether they contain objects.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r--src/keyboard.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 5fa58abce1d..590d183c4c6 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -12475,13 +12475,11 @@ keys_of_keyboard (void)
void
mark_kboards (void)
{
- KBOARD *kb;
- Lisp_Object *p;
- for (kb = all_kboards; kb; kb = kb->next_kboard)
+ for (KBOARD *kb = all_kboards; kb; kb = kb->next_kboard)
{
if (kb->kbd_macro_buffer)
- for (p = kb->kbd_macro_buffer; p < kb->kbd_macro_ptr; p++)
- mark_object (*p);
+ mark_objects (kb->kbd_macro_buffer,
+ kb->kbd_macro_ptr - kb->kbd_macro_buffer);
mark_object (KVAR (kb, Voverriding_terminal_local_map));
mark_object (KVAR (kb, Vlast_command));
mark_object (KVAR (kb, Vreal_last_command));