From: Gerd Möllmann Date: Fri, 14 Oct 2022 08:51:50 +0000 (+0200) Subject: Remove Lisp_Symbol::interned X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0e5323c908cadf96bba6390a70025ad734da4c0f;p=emacs.git Remove Lisp_Symbol::interned --- diff --git a/src/alloc.c b/src/alloc.c index 034d82e3ea0..ba5629c9c92 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 c5ce309306f..ab99535663d 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 f847879ebc6..365e47d1468 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 d7102b4298b..fdbdf1db10c 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 4ddc2c155c7..8f1f33c4d5d 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)) {