[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/no-purespace 289e5dc03a0 08/13: Pure storage removal: Remove sup
From: |
Pip Cet |
Subject: |
scratch/no-purespace 289e5dc03a0 08/13: Pure storage removal: Remove support for pinned objects |
Date: |
Tue, 20 Aug 2024 15:42:48 -0400 (EDT) |
branch: scratch/no-purespace
commit 289e5dc03a0982fdab813a1db6699ff05928cc46
Author: Pip Cet <pipcet@protonmail.com>
Commit: Pip Cet <pipcet@protonmail.com>
Pure storage removal: Remove support for pinned objects
* src/alloc.c (symbol_block_pinned): Remove variable.
(init_symbol): Don't initialize 'pinned flag'.
(pinned_objects): Remove variable.
(mark_pinned_objects):
(mark_pinned_symbols): Remove functions.
(garbage_collect): Don't call 'mark_pinned_objects',
'mark_pinned_symbols'.
* src/lisp.h (struct Lisp_Symbol): Remove 'pinned' flag.
* src/pdumper.c (dump_symbol): Remove 'pinned' flag from dump.
---
src/alloc.c | 47 -----------------------------------------------
src/lisp.h | 3 ---
src/pdumper.c | 1 -
3 files changed, 51 deletions(-)
diff --git a/src/alloc.c b/src/alloc.c
index 9bd8be57146..f7b403f8c0a 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3890,13 +3890,6 @@ struct symbol_block
static struct symbol_block *symbol_block;
static int symbol_block_index = SYMBOL_BLOCK_SIZE;
-/* Pointer to the first symbol_block that contains pinned symbols.
- Tests for 24.4 showed that at dump-time, Emacs contains about 15K symbols,
- 10K of which are pinned (and all but 250 of them are interned in obarray),
- whereas a "typical session" has in the order of 30K symbols.
- `symbol_block_pinned' lets mark_pinned_symbols scan only 15K symbols rather
- than 30K to find the 10K symbols we need to mark. */
-static struct symbol_block *symbol_block_pinned;
/* List of free symbols. */
@@ -3922,7 +3915,6 @@ init_symbol (Lisp_Object val, Lisp_Object name)
p->u.s.interned = SYMBOL_UNINTERNED;
p->u.s.trapped_write = SYMBOL_UNTRAPPED_WRITE;
p->u.s.declared_special = false;
- p->u.s.pinned = false;
}
DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0,
@@ -5658,13 +5650,6 @@ Does not copy symbols. Copies strings without text
properties. */)
return purecopy (obj);
}
-/* Pinned objects are marked before every GC cycle. */
-static struct pinned_object
-{
- Lisp_Object object;
- struct pinned_object *next;
-} *pinned_objects;
-
static Lisp_Object
purecopy (Lisp_Object obj)
{
@@ -5874,13 +5859,6 @@ compact_undo_list (Lisp_Object list)
return list;
}
-static void
-mark_pinned_objects (void)
-{
- for (struct pinned_object *pobj = pinned_objects; pobj; pobj = pobj->next)
- mark_object (pobj->object);
-}
-
#if defined HAVE_ANDROID && !defined (__clang__)
/* The Android gcc is broken and needs the following version of
@@ -5904,29 +5882,6 @@ android_make_lisp_symbol (struct Lisp_Symbol *sym)
#endif
-static void
-mark_pinned_symbols (void)
-{
- struct symbol_block *sblk;
- int lim;
- struct Lisp_Symbol *sym, *end;
-
- if (symbol_block_pinned == symbol_block)
- lim = symbol_block_index;
- else
- lim = SYMBOL_BLOCK_SIZE;
-
- for (sblk = symbol_block_pinned; sblk; sblk = sblk->next)
- {
- sym = sblk->symbols, end = sym + lim;
- for (; sym < end; ++sym)
- if (sym->u.s.pinned)
- mark_object (make_lisp_symbol (sym));
-
- lim = SYMBOL_BLOCK_SIZE;
- }
-}
-
static void
visit_vectorlike_root (struct gc_root_visitor visitor,
struct Lisp_Vector *ptr,
@@ -6190,8 +6145,6 @@ garbage_collect (void)
struct gc_root_visitor visitor = { .visit = mark_object_root_visitor };
visit_static_gc_roots (visitor);
- mark_pinned_objects ();
- mark_pinned_symbols ();
mark_lread ();
mark_terminals ();
mark_kboards ();
diff --git a/src/lisp.h b/src/lisp.h
index d566029681c..ccda02ab4e1 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -797,9 +797,6 @@ struct Lisp_Symbol
special (with `defvar' etc), and shouldn't be lexically bound. */
bool_bf declared_special : 1;
- /* True if pointed to from purespace and hence can't be GC'd. */
- bool_bf pinned : 1;
-
/* The symbol's name, as a Lisp string. */
Lisp_Object name;
diff --git a/src/pdumper.c b/src/pdumper.c
index d25c9365e91..ef786f4a678 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -2502,7 +2502,6 @@ dump_symbol (struct dump_context *ctx,
DUMP_FIELD_COPY (&out, symbol, u.s.trapped_write);
DUMP_FIELD_COPY (&out, symbol, u.s.interned);
DUMP_FIELD_COPY (&out, symbol, u.s.declared_special);
- DUMP_FIELD_COPY (&out, symbol, u.s.pinned);
dump_field_lv (ctx, &out, symbol, &symbol->u.s.name, WEIGHT_STRONG);
switch (symbol->u.s.redirect)
{
- scratch/no-purespace ec121292d5c 01/13: Unexec removal: Remove obsolete files, (continued)
- scratch/no-purespace ec121292d5c 01/13: Unexec removal: Remove obsolete files, Pip Cet, 2024/08/20
- scratch/no-purespace 04350a6ece0 03/13: Unexec removal: Remove HYBRID_MALLOC support, Pip Cet, 2024/08/20
- scratch/no-purespace d1fc482192e 05/13: Pure storage removal: Remove puresize.h, Pip Cet, 2024/08/20
- scratch/no-purespace 5f48bd7f026 09/13: Pure storage removal: Remove purecopy hash table flag, Pip Cet, 2024/08/20
- scratch/no-purespace f0cf0c12ace 02/13: Unexec removal: Main part, Pip Cet, 2024/08/20
- scratch/no-purespace 46a4894244d 06/13: Pure storage removal: Main part, Pip Cet, 2024/08/20
- scratch/no-purespace 5099385e63d 10/13: Pure storage removal: Remove docstring hack, Pip Cet, 2024/08/20
- scratch/no-purespace 813b4414b02 12/13: Pure storage removal: Remove documentation, Pip Cet, 2024/08/20
- scratch/no-purespace 7ef3be39939 11/13: Pure storage removal: Adjust nativecomp code, Pip Cet, 2024/08/20
- scratch/no-purespace 1e8513ee38e 13/13: Pure storage removal: Bump nativecomp ABI, Pip Cet, 2024/08/20
- scratch/no-purespace 289e5dc03a0 08/13: Pure storage removal: Remove support for pinned objects,
Pip Cet <=
- scratch/no-purespace 976196cba66 07/13: Pure storage removal: Replace calls to removed functions, Pip Cet, 2024/08/20