aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPip Cet2021-05-16 15:44:26 +0200
committerStefan Monnier2022-07-01 18:59:35 -0400
commitb6a526361b57f8d9f6d5078ccd97832d0a1fb036 (patch)
tree0c752a1c74920a2b731bb2e3c2ff6623be240a72 /src/lisp.h
parent3daf833ff3f3e99b44731808cb197c0912649997 (diff)
downloademacs-scratch/no-purespace-old.tar.gz
emacs-scratch/no-purespace-old.zip
Remove purespace and ancillary codescratch/no-purespace-old
Now that purespace is not used any more, remove it, along with the functions used to allocate into it. Use equivalent functions allocating into the normal heap. Remove calls to PURE_P since they always return false. * src/puresize.h: Delete file. * src/alloc.c: Don't include `puresize.h` any more. (pure, purebeg, pure_size, pure_bytes_used_before_overflow) (pure_bytes_used_lisp, pure_bytes_used_non_lisp, symbol_block_pinned) (pinned_objects): Delete vars. (PUREBEG): Delete macro. (pointer_align): Move after definition of USE_ALIGNED_ALLOC and only define it if USE_ALIGNED_ALLOC is not used. (cons_listn): Remove `cons` arg, hardcode `Fcons` instead. (pure_listn, pure_alloc, check_pure_size, make_pure_string) (make_pure_c_string, pure_cons): Delete functions. (init_symbol): Don't set `pinned` any more. (mark_pinned_objects, mark_pinned_symbols): Delete functions. (garbage_collect): Don't call them any more. (init_alloc_once_for_pdumper): Don't initialize purebeg and pure_size. * src/print.c (print_object) <PVEC_HASH_TABLE>: Don't print `purecopy`. * src/pdumper.c (dump_symbol, dump_hash_table): Update sig hash. (dump_symbol): Don't dump `pinned`. (dump_hash_table): Don't dump `purecopy`. * src/lread.c (readevalloop, read_internal_start): Adjust call to `make_hash_table`. (read0, intern_c_string_1, define_symbol, Fintern): Don't purify symbol names. (string): Avoid `pure_cons` and `build_pure_c_string`. * src/lisp.h (struct Lisp_Symbol): Remove `pinned` field. (struct Lisp_Hash_Table): Remove `purecopy` field. (check_pure_size, pure_listn, pure_list, make_pure_string) (make_pure_c_string, pure_cons): Remove prototypes. (build_pure_c_string): Delete function. * src/keymap.c: Don't include `puresize.h` any more. (Fmake_sparse_keymap): Don't purecopy the menu name. (Fset_keymap_parent, store_in_keymap): Don't `CHECK_IMPURE` any more. (syms_of_keymap): Avoid `pure_cons` and `build_pure_c_string`. * src/intervals.c: Don't include `puresize.h` any more. (create_root_interval): Don't `CHECK_IMPURE` any more. * src/fns.c: Don't include `puresize.h` any more. (Ffillarray, Fclear_string): Don't `CHECK_IMPURE` any more. (make_hash_table): Remove `purecopy` arg. (Fmake_hash_table): Remove `:purecopy` keyword argument. * src/eval.c (Finternal__define_uninitialized_variable): Don't purecopy the doc any more. (Fdefconst_1): Don't purecopy the initvalue any more. (Fautoload): Get rid of hack needed when we used hash-consing. (syms_of_eval): Avoid `build_pure_c_string`. * src/emacs.c: Don't include `puresize.h` any more. (Fdump_emacs): Don't `check_pure_size`. * src/doc.c (Fsnarf_documentation): Don't purecopy the build files. * src/deps.mk: Remove puresize.h. * src/data.c: Don't include `puresize.h` any more. (pure_write_error): Delete function. (Fsetcar, Fsetcdr): Don't `CHECK_IMPURE` any more. (Fdefalias): Don't purecopy the definition any more. (Faset): Don't `CHECK_IMPURE` any more. (syms_of_data): Avoid `pure_cons` and `build_pure_c_string`. * src/conf_post.h (SYSTEM_PURESIZE_EXTRA): Delete macro. * src/comp.c: Don't include `puresize.h` any more. (helper_link_table): Remove `pure_write_error`. (define_CHECK_IMPURE): Delete function. (maybe_defer_native_compilation, syms_of_comp): Avoid `build_pure_c_string`. * src/category.c (hash_get_category_set): Update call to `make_hash_table`. (Fdefine_category): Don't purecopy the docstring any more. * src/bytecode.c: Don't include `puresize.h` any more. (Bsetcar, Bsetcdr): Don't `CHECK_IMPURE` any more. * doc/lispref/internals.texi (Pure Storage): Delete section. (Garbage Collection): Remove note about purespace overflow. * src/xfaces.c (syms_of_xfaces): * src/emacs-module.c (syms_of_module): * src/frame.c (make_frame, make_initial_frame): * src/fileio.c (syms_of_fileio): * src/image.c (xpm_make_color_table_h): * src/process.c (ADD_SUBFEATURE, syms_of_process): * src/profiler.c (make_log): * src/json.c (define_error): * src/xterm.c (syms_of_xterm): * src/xfns.c (syms_of_xfns): * src/xdisp.c (syms_of_xdisp): * src/w32fns.c (syms_of_w32fns): * src/syntax.c (syms_of_syntax): * src/sqlite.c (syms_of_sqlite): * src/search.c (syms_of_search): * src/keyboard.c (syms_of_keyboard): * src/fontset.c (syms_of_fontset): * src/dbusbind.c (syms_of_dbusbind): * src/coding.c (syms_of_coding): * src/callint.c (syms_of_callint): * src/buffer.c (init_buffer_once, syms_of_buffer): Avoid `build_pure_c_string`, `Fpurecopy`, `pure_cons`, and `pure_list`, and adjust calls to `make_hash_table`.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 7a7d2e79979..7be2e5d38dc 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -859,9 +859,6 @@ struct Lisp_Symbol
859 special (with `defvar' etc), and shouldn't be lexically bound. */ 859 special (with `defvar' etc), and shouldn't be lexically bound. */
860 bool_bf declared_special : 1; 860 bool_bf declared_special : 1;
861 861
862 /* True if pointed to from purespace and hence can't be GC'd. */
863 bool_bf pinned : 1;
864
865 /* The symbol's name, as a Lisp string. */ 862 /* The symbol's name, as a Lisp string. */
866 Lisp_Object name; 863 Lisp_Object name;
867 864
@@ -2426,12 +2423,8 @@ struct Lisp_Hash_Table
2426 /* Index of first free entry in free list, or -1 if none. */ 2423 /* Index of first free entry in free list, or -1 if none. */
2427 ptrdiff_t next_free; 2424 ptrdiff_t next_free;
2428 2425
2429 /* True if the table can be purecopied. The table cannot be
2430 changed afterwards. */
2431 bool purecopy;
2432
2433 /* True if the table is mutable. Ordinarily tables are mutable, but 2426 /* True if the table is mutable. Ordinarily tables are mutable, but
2434 pure tables are not, and while a table is being mutated it is 2427 some tables are not, and while a table is being mutated it is
2435 immutable for recursive attempts to mutate it. */ 2428 immutable for recursive attempts to mutate it. */
2436 bool mutable; 2429 bool mutable;
2437 2430
@@ -4010,7 +4003,7 @@ EMACS_UINT hash_string (char const *, ptrdiff_t);
4010EMACS_UINT sxhash (Lisp_Object); 4003EMACS_UINT sxhash (Lisp_Object);
4011Lisp_Object hashfn_user_defined (Lisp_Object, struct Lisp_Hash_Table *); 4004Lisp_Object hashfn_user_defined (Lisp_Object, struct Lisp_Hash_Table *);
4012Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float, 4005Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float,
4013 Lisp_Object, bool); 4006 Lisp_Object);
4014ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object *); 4007ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object *);
4015ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, 4008ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
4016 Lisp_Object); 4009 Lisp_Object);
@@ -4177,7 +4170,6 @@ extern void parse_str_as_multibyte (const unsigned char *, ptrdiff_t,
4177 4170
4178/* Defined in alloc.c. */ 4171/* Defined in alloc.c. */
4179extern void *my_heap_start (void); 4172extern void *my_heap_start (void);
4180extern void check_pure_size (void);
4181unsigned char *resize_string_data (Lisp_Object, ptrdiff_t, int, int); 4173unsigned char *resize_string_data (Lisp_Object, ptrdiff_t, int, int);
4182extern void malloc_warning (const char *); 4174extern void malloc_warning (const char *);
4183extern AVOID memory_full (size_t); 4175extern AVOID memory_full (size_t);
@@ -4236,11 +4228,8 @@ extern Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
4236extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, 4228extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
4237 Lisp_Object); 4229 Lisp_Object);
4238extern Lisp_Object listn (ptrdiff_t, Lisp_Object, ...); 4230extern Lisp_Object listn (ptrdiff_t, Lisp_Object, ...);
4239extern Lisp_Object pure_listn (ptrdiff_t, Lisp_Object, ...);
4240#define list(...) \ 4231#define list(...) \
4241 listn (ARRAYELTS (((Lisp_Object []) {__VA_ARGS__})), __VA_ARGS__) 4232 listn (ARRAYELTS (((Lisp_Object []) {__VA_ARGS__})), __VA_ARGS__)
4242#define pure_list(...) \
4243 pure_listn (ARRAYELTS (((Lisp_Object []) {__VA_ARGS__})), __VA_ARGS__)
4244 4233
4245enum gc_root_type 4234enum gc_root_type
4246{ 4235{
@@ -4313,18 +4302,8 @@ extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT);
4313extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t); 4302extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t);
4314extern Lisp_Object make_specified_string (const char *, 4303extern Lisp_Object make_specified_string (const char *,
4315 ptrdiff_t, ptrdiff_t, bool); 4304 ptrdiff_t, ptrdiff_t, bool);
4316extern Lisp_Object make_pure_string (const char *, ptrdiff_t, ptrdiff_t, bool);
4317extern Lisp_Object make_pure_c_string (const char *, ptrdiff_t);
4318extern void pin_string (Lisp_Object string); 4305extern void pin_string (Lisp_Object string);
4319 4306
4320/* Make a string allocated in pure space, use STR as string data. */
4321
4322INLINE Lisp_Object
4323build_pure_c_string (const char *str)
4324{
4325 return make_pure_c_string (str, strlen (str));
4326}
4327
4328/* Make a string from the data at STR, treating it as multibyte if the 4307/* Make a string from the data at STR, treating it as multibyte if the
4329 data warrants. */ 4308 data warrants. */
4330 4309
@@ -4334,7 +4313,6 @@ build_string (const char *str)
4334 return make_string (str, strlen (str)); 4313 return make_string (str, strlen (str));
4335} 4314}
4336 4315
4337extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
4338extern Lisp_Object make_vector (ptrdiff_t, Lisp_Object); 4316extern Lisp_Object make_vector (ptrdiff_t, Lisp_Object);
4339extern struct Lisp_Vector *allocate_nil_vector (ptrdiff_t) 4317extern struct Lisp_Vector *allocate_nil_vector (ptrdiff_t)
4340 ATTRIBUTE_RETURNS_NONNULL; 4318 ATTRIBUTE_RETURNS_NONNULL;