From 8e2e2ceb1745620bef318fc403b6dea2c590f318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 4 Feb 2022 10:41:44 +0100 Subject: Deprecate symbol properties. * libguile/strings.c (scm_i_make_symbol): Remove 'props' argument. Use 3 words instead of 'scm_double_cell'. * libguile/strings.h: Adjust accordingly. * libguile/symbols.c (scm_i_str2symbol, scm_i_str2uninterned_symbol): Likewise. (scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x, scm_symbol_pset_x): Move to... * libguile/deprecated.c: ... here. Rewrite in terms of object properties. (symbol_function_slot, symbol_property_slot): New variables. * libguile/symbols.h (SCM_SYMBOL_FUNC, SCM_SET_SYMBOL_FUNC) (SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS) (scm_symbol_fref, scm_symbol_pref, scm_symbol_fset_x) (scm_symbol_pset_x): Move to... * libguile/deprecated.h: ... here. Mark declarations as 'SCM_DEPRECATED'. * module/system/base/types.scm (cell->object): Remove 'props' field for %TC7-SYMBOL. * doc/ref/api-data.texi (Symbol Props): Remove. * NEWS: Update. --- NEWS | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 17a4c3961..93eac87b8 100644 --- a/NEWS +++ b/NEWS @@ -175,6 +175,14 @@ SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG, SCM_I_ARRAY_CONTP preprocessor interfaces, as they were internal and there is no longer a sensible way of using them. +** Deprecate symbol properties + +Symbols used to have a "function slot" and a "property slot", inherited +from Emacs Lisp and early Lisps, which one would access with +'symbol-pref', 'symbol-fref', 'symbol-pset!', and 'symbol-fset!'. These +procedures have been discouraged in favor of object properties; they are +now deprecated. This saves a few words of memory per symbol. + * Bug fixes ** Fix compilation of (ash x N), where N is a literal, at -O1 and below -- cgit v1.2.1