aboutsummaryrefslogtreecommitdiffstats
path: root/src/lisp.h
diff options
context:
space:
mode:
authorPip Cet2021-05-16 15:44:26 +0200
committerStefan Monnier2022-07-01 09:42:00 -0400
commit094fd7ded365434b08f5d7c8ff499d17d566d54b (patch)
tree40366419e9d899e48c26439f428fee7b741d307c /src/lisp.h
parent3a4c408a7b6f3df5ca0eb4a406efbdb4899e9742 (diff)
downloademacs-scratch/no-purespace-2.tar.gz
emacs-scratch/no-purespace-2.zip
Remove purespace from Emacsscratch/no-purespace-2
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h40
1 files changed, 6 insertions, 34 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 7a7d2e79979..8840caa06c2 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
@@ -1632,20 +1629,14 @@ STRING_MULTIBYTE (Lisp_Object str)
1632/* Mark STR as a unibyte string. */ 1629/* Mark STR as a unibyte string. */
1633#define STRING_SET_UNIBYTE(STR) \ 1630#define STRING_SET_UNIBYTE(STR) \
1634 do { \ 1631 do { \
1635 if (XSTRING (STR)->u.s.size == 0) \ 1632 XSTRING (STR)->u.s.size_byte = -1; \
1636 (STR) = empty_unibyte_string; \
1637 else \
1638 XSTRING (STR)->u.s.size_byte = -1; \
1639 } while (false) 1633 } while (false)
1640 1634
1641/* Mark STR as a multibyte string. Assure that STR contains only 1635/* Mark STR as a multibyte string. Assure that STR contains only
1642 ASCII characters in advance. */ 1636 ASCII characters in advance. */
1643#define STRING_SET_MULTIBYTE(STR) \ 1637#define STRING_SET_MULTIBYTE(STR) \
1644 do { \ 1638 do { \
1645 if (XSTRING (STR)->u.s.size == 0) \ 1639 XSTRING (STR)->u.s.size_byte = XSTRING (STR)->u.s.size; \
1646 (STR) = empty_multibyte_string; \
1647 else \
1648 XSTRING (STR)->u.s.size_byte = XSTRING (STR)->u.s.size; \
1649 } while (false) 1640 } while (false)
1650 1641
1651/* Convenience functions for dealing with Lisp strings. */ 1642/* Convenience functions for dealing with Lisp strings. */
@@ -2426,12 +2417,8 @@ struct Lisp_Hash_Table
2426 /* Index of first free entry in free list, or -1 if none. */ 2417 /* Index of first free entry in free list, or -1 if none. */
2427 ptrdiff_t next_free; 2418 ptrdiff_t next_free;
2428 2419
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 2420 /* 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 2421 some tables are not, and while a table is being mutated it is
2435 immutable for recursive attempts to mutate it. */ 2422 immutable for recursive attempts to mutate it. */
2436 bool mutable; 2423 bool mutable;
2437 2424
@@ -4010,7 +3997,7 @@ EMACS_UINT hash_string (char const *, ptrdiff_t);
4010EMACS_UINT sxhash (Lisp_Object); 3997EMACS_UINT sxhash (Lisp_Object);
4011Lisp_Object hashfn_user_defined (Lisp_Object, struct Lisp_Hash_Table *); 3998Lisp_Object hashfn_user_defined (Lisp_Object, struct Lisp_Hash_Table *);
4012Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float, 3999Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float,
4013 Lisp_Object, bool); 4000 Lisp_Object);
4014ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object *); 4001ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object *);
4015ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, 4002ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object,
4016 Lisp_Object); 4003 Lisp_Object);
@@ -4177,7 +4164,6 @@ extern void parse_str_as_multibyte (const unsigned char *, ptrdiff_t,
4177 4164
4178/* Defined in alloc.c. */ 4165/* Defined in alloc.c. */
4179extern void *my_heap_start (void); 4166extern void *my_heap_start (void);
4180extern void check_pure_size (void);
4181unsigned char *resize_string_data (Lisp_Object, ptrdiff_t, int, int); 4167unsigned char *resize_string_data (Lisp_Object, ptrdiff_t, int, int);
4182extern void malloc_warning (const char *); 4168extern void malloc_warning (const char *);
4183extern AVOID memory_full (size_t); 4169extern AVOID memory_full (size_t);
@@ -4236,11 +4222,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, 4222extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
4237 Lisp_Object); 4223 Lisp_Object);
4238extern Lisp_Object listn (ptrdiff_t, Lisp_Object, ...); 4224extern Lisp_Object listn (ptrdiff_t, Lisp_Object, ...);
4239extern Lisp_Object pure_listn (ptrdiff_t, Lisp_Object, ...);
4240#define list(...) \ 4225#define list(...) \
4241 listn (ARRAYELTS (((Lisp_Object []) {__VA_ARGS__})), __VA_ARGS__) 4226 listn (ARRAYELTS (((Lisp_Object []) {__VA_ARGS__})), __VA_ARGS__)
4242#define pure_list(...) \
4243 pure_listn (ARRAYELTS (((Lisp_Object []) {__VA_ARGS__})), __VA_ARGS__)
4244 4227
4245enum gc_root_type 4228enum gc_root_type
4246{ 4229{
@@ -4313,18 +4296,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); 4296extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t);
4314extern Lisp_Object make_specified_string (const char *, 4297extern Lisp_Object make_specified_string (const char *,
4315 ptrdiff_t, ptrdiff_t, bool); 4298 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); 4299extern void pin_string (Lisp_Object string);
4319 4300
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 4301/* Make a string from the data at STR, treating it as multibyte if the
4329 data warrants. */ 4302 data warrants. */
4330 4303
@@ -4334,7 +4307,6 @@ build_string (const char *str)
4334 return make_string (str, strlen (str)); 4307 return make_string (str, strlen (str));
4335} 4308}
4336 4309
4337extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object);
4338extern Lisp_Object make_vector (ptrdiff_t, Lisp_Object); 4310extern Lisp_Object make_vector (ptrdiff_t, Lisp_Object);
4339extern struct Lisp_Vector *allocate_nil_vector (ptrdiff_t) 4311extern struct Lisp_Vector *allocate_nil_vector (ptrdiff_t)
4340 ATTRIBUTE_RETURNS_NONNULL; 4312 ATTRIBUTE_RETURNS_NONNULL;