SET_SYMBOL_VAL (p, Qunbound);
set_symbol_function (val, Qnil);
set_symbol_package (val, Qnil);
- set_symbol_next (val, NULL);
p->u.s.gcmarkbit = false;
p->u.s.trapped_write = SYMBOL_UNTRAPPED_WRITE;
p->u.s.declared_special = false;
if (symbol_free_list)
{
XSETSYMBOL (val, symbol_free_list);
- symbol_free_list = symbol_free_list->u.s.next;
+ symbol_free_list = next_free_symbol (symbol_free_list);
}
else
{
|| off == offsetof (struct Lisp_Symbol, u.s.val)
|| off == offsetof (struct Lisp_Symbol, u.s.function)
|| off == offsetof (struct Lisp_Symbol, u.s.package)
- || off == offsetof (struct Lisp_Symbol, u.s.plist)
- || off == offsetof (struct Lisp_Symbol, u.s.next))
+ || off == offsetof (struct Lisp_Symbol, u.s.plist))
{
struct Lisp_Symbol *s = p = cp -= off;
if (!deadp (s->u.s.function))
case Lisp_Symbol:
{
struct Lisp_Symbol *ptr = XBARE_SYMBOL (obj);
- nextsym:
if (symbol_marked_p (ptr))
break;
CHECK_ALLOCATED_AND_LIVE_SYMBOL ();
set_string_marked (XSTRING (ptr->u.s.name));
mark_interval_tree (string_intervals (ptr->u.s.name));
/* Inner loop to mark next symbol in this bucket, if any. */
- po = ptr = ptr->u.s.next;
- if (ptr)
- goto nextsym;
}
break;
time we sweep this symbol_block (bug#29066). */
sym->u.s.redirect = SYMBOL_PLAINVAL;
}
- sym->u.s.next = symbol_free_list;
+ set_next_free_symbol (sym, symbol_free_list);
symbol_free_list = sym;
symbol_free_list->u.s.function = dead_object ();
++this_free;
{
*sprev = sblk->next;
/* Unhook from the free list. */
- symbol_free_list = sblk->symbols[0].u.s.next;
+ symbol_free_list = next_free_symbol (&sblk->symbols[0]);
lisp_free (sblk);
}
else
/* The symbol's package, or nil. */
Lisp_Object package;
-
- /* Next symbol in obarray bucket, if the symbol is interned. */
- struct Lisp_Symbol *next;
} s;
GCALIGNED_UNION_MEMBER
} u;
};
verify (GCALIGNED (struct Lisp_Symbol));
+INLINE struct Lisp_Symbol *
+next_free_symbol (struct Lisp_Symbol *sym)
+{
+ return *(struct Lisp_Symbol **) sym;
+}
+
+INLINE void
+set_next_free_symbol (struct Lisp_Symbol *sym, struct Lisp_Symbol *free)
+{
+ *(struct Lisp_Symbol **) sym = free;
+}
+
+
+
/* Declare a Lisp-callable function. The MAXARGS parameter has the same
meaning as in the DEFUN macro, and is used to construct a prototype. */
/* We can use the same trick as in the DEFUN macro to generate the
XSYMBOL (sym)->u.s.plist = plist;
}
-INLINE void
-set_symbol_next (Lisp_Object sym, struct Lisp_Symbol *next)
-{
- XSYMBOL (sym)->u.s.next = next;
-}
-
INLINE void
make_symbol_constant (Lisp_Object sym)
{
dump_field_lv (ctx, &out, symbol, &symbol->u.s.function, WEIGHT_NORMAL);
dump_field_lv (ctx, &out, symbol, &symbol->u.s.package, WEIGHT_NORMAL);
dump_field_lv (ctx, &out, symbol, &symbol->u.s.plist, WEIGHT_NORMAL);
- dump_field_lv_rawptr (ctx, &out, symbol, &symbol->u.s.next, Lisp_Symbol,
- WEIGHT_STRONG);
offset = dump_object_finish (ctx, &out, sizeof (out));
dump_off aux_offset;