[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pkg 0e5323c908 16/76: Remove Lisp_Symbol::interned
From: |
Gerd Moellmann |
Subject: |
pkg 0e5323c908 16/76: Remove Lisp_Symbol::interned |
Date: |
Fri, 21 Oct 2022 00:16:10 -0400 (EDT) |
branch: pkg
commit 0e5323c908cadf96bba6390a70025ad734da4c0f
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
Remove Lisp_Symbol::interned
---
src/alloc.c | 1 -
src/lisp.h | 29 -----------------------------
src/lread.c | 4 ----
src/pdumper.c | 1 -
src/print.c | 4 ++--
5 files changed, 2 insertions(+), 37 deletions(-)
diff --git a/src/alloc.c b/src/alloc.c
index 034d82e3ea..ba5629c9c9 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3628,7 +3628,6 @@ init_symbol (Lisp_Object val, Lisp_Object name)
set_symbol_package (val, Qnil);
set_symbol_next (val, NULL);
p->u.s.gcmarkbit = false;
- 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;
diff --git a/src/lisp.h b/src/lisp.h
index c5ce309306..ab99535663 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -808,15 +808,6 @@ INLINE void
help static checking. */
typedef struct { void const *fwdptr; } lispfwd;
-/* Interned state of a symbol. */
-
-enum symbol_interned
-{
- SYMBOL_UNINTERNED = 0,
- SYMBOL_INTERNED = 1,
- SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
-};
-
enum symbol_redirect
{
SYMBOL_PLAINVAL = 4,
@@ -852,10 +843,6 @@ struct Lisp_Symbol
2 : trap the write, call watcher functions. */
ENUM_BF (symbol_trapped_write) trapped_write : 2;
- /* Interned state of the symbol. This is an enumerator from
- enum symbol_interned. */
- unsigned interned : 2;
-
/* True means that this variable has been explicitly declared
special (with `defvar' etc), and shouldn't be lexically bound. */
bool_bf declared_special : 1;
@@ -2411,22 +2398,6 @@ SYMBOL_EXTERNAL_P (Lisp_Object sym)
return XSYMBOL (sym)->u.s.external;
}
-/* Value is true if SYM is an interned symbol. */
-
-INLINE bool
-SYMBOL_INTERNED_P (Lisp_Object sym)
-{
- return XSYMBOL (sym)->u.s.interned != SYMBOL_UNINTERNED;
-}
-
-/* Value is true if SYM is interned in initial_obarray. */
-
-INLINE bool
-SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (Lisp_Object sym)
-{
- return XSYMBOL (sym)->u.s.interned == SYMBOL_INTERNED_IN_INITIAL_OBARRAY;
-}
-
/* Value is non-zero if symbol cannot be changed through a simple set,
i.e. it's a constant (e.g. nil, t, :keywords), or it has some
watching functions. */
diff --git a/src/lread.c b/src/lread.c
index f847879ebc..365e47d146 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4758,10 +4758,6 @@ intern_sym (Lisp_Object sym, Lisp_Object obarray,
Lisp_Object index)
{
Lisp_Object *ptr;
- XSYMBOL (sym)->u.s.interned = (EQ (obarray, initial_obarray)
- ? SYMBOL_INTERNED_IN_INITIAL_OBARRAY
- : SYMBOL_INTERNED);
-
if (SREF (SYMBOL_NAME (sym), 0) == ':' && EQ (obarray, initial_obarray))
{
make_symbol_constant (sym);
diff --git a/src/pdumper.c b/src/pdumper.c
index d7102b4298..fdbdf1db10 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -2447,7 +2447,6 @@ dump_symbol (struct dump_context *ctx,
eassert (symbol->u.s.gcmarkbit == 0);
DUMP_FIELD_COPY (&out, symbol, u.s.redirect);
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_COPY (&out, symbol, u.s.external);
diff --git a/src/print.c b/src/print.c
index 4ddc2c155c..8f1f33c4d5 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1310,7 +1310,7 @@ print (Lisp_Object obj, Lisp_Object printcharfun, bool
escapeflag)
|| RECORDP (obj))) \
|| (! NILP (Vprint_gensym) \
&& SYMBOLP (obj) \
- && !SYMBOL_INTERNED_P (obj)))
+ && NILP (SYMBOL_PACKAGE (obj))))
/* The print preprocess stack, used to traverse data structures. */
@@ -1412,7 +1412,7 @@ print_preprocess (Lisp_Object obj)
the lisp function byte-compile-output-docform. */
|| (!NILP (Vprint_continuous_numbering)
&& SYMBOLP (obj)
- && !SYMBOL_INTERNED_P (obj)))
+ && NILP (SYMBOL_PACKAGE (obj))))
{ /* OBJ appears more than once. Let's remember that. */
if (!FIXNUMP (num))
{
- pkg 051a17f540 63/76: Fix some warnings, (continued)
- pkg 051a17f540 63/76: Fix some warnings, Gerd Moellmann, 2022/10/21
- pkg 0f4b419fa3 65/76: Remove unused function prototype from lisp.h, Gerd Moellmann, 2022/10/21
- pkg adf7b760f2 12/76: More symbol reading, Gerd Moellmann, 2022/10/21
- pkg e2b79c2c5a 14/76: Revert the escaping of symbol names in lisp files, Gerd Moellmann, 2022/10/21
- pkg 4d4690f8cf 75/76: Handle keywords in image specs, Gerd Moellmann, 2022/10/21
- pkg f45b266d0e 03/76: Don't use symbols that look package-qualified, Gerd Moellmann, 2022/10/21
- pkg 06cfa629a5 05/76: Print symbols differently, Gerd Moellmann, 2022/10/21
- pkg 54a08db92b 01/76: Basic functionality for packages, Gerd Moellmann, 2022/10/21
- pkg 3e29407122 10/76: And more fixes, Gerd Moellmann, 2022/10/21
- pkg 8615f5b048 15/76: Can now pdumg withput warnings from cl-defstruct, Gerd Moellmann, 2022/10/21
- pkg 0e5323c908 16/76: Remove Lisp_Symbol::interned,
Gerd Moellmann <=
- pkg aa00af4e17 26/76: Consider shorthands out of scope, Gerd Moellmann, 2022/10/21
- pkg 4c1bbd4fd7 31/76: intern-soft with ':' trick, Gerd Moellmann, 2022/10/21
- pkg ea65e35cf3 28/76: src/alloc.c: Remove all uses of `pure_alloc`, Gerd Moellmann, 2022/10/21
- pkg a5f6912c6d 30/76: Mapatoms differently, Gerd Moellmann, 2022/10/21
- pkg 2edc30628a 27/76: Use build_pure_c_string, Gerd Moellmann, 2022/10/21
- pkg 85c0eb1682 36/76: Merge remote-tracking branch 'origin/master' into pkg, Gerd Moellmann, 2022/10/21
- pkg 07f0b758ae 62/76: hash_remove_from_table returns bool, Gerd Moellmann, 2022/10/21
- pkg e1a730849e 42/76: Fix printing uninterned symbols, Gerd Moellmann, 2022/10/21
- pkg 1424d2c6b7 61/76: Fix intern-soft, Gerd Moellmann, 2022/10/21
- pkg bdca01dd38 29/76: Workaround for something Stefan missed, Gerd Moellmann, 2022/10/21