diff options
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 40 |
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); | |||
| 4010 | EMACS_UINT sxhash (Lisp_Object); | 3997 | EMACS_UINT sxhash (Lisp_Object); |
| 4011 | Lisp_Object hashfn_user_defined (Lisp_Object, struct Lisp_Hash_Table *); | 3998 | Lisp_Object hashfn_user_defined (Lisp_Object, struct Lisp_Hash_Table *); |
| 4012 | Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float, | 3999 | Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float, |
| 4013 | Lisp_Object, bool); | 4000 | Lisp_Object); |
| 4014 | ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object *); | 4001 | ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object *); |
| 4015 | ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, | 4002 | ptrdiff_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. */ |
| 4179 | extern void *my_heap_start (void); | 4166 | extern void *my_heap_start (void); |
| 4180 | extern void check_pure_size (void); | ||
| 4181 | unsigned char *resize_string_data (Lisp_Object, ptrdiff_t, int, int); | 4167 | unsigned char *resize_string_data (Lisp_Object, ptrdiff_t, int, int); |
| 4182 | extern void malloc_warning (const char *); | 4168 | extern void malloc_warning (const char *); |
| 4183 | extern AVOID memory_full (size_t); | 4169 | extern AVOID memory_full (size_t); |
| @@ -4236,11 +4222,8 @@ extern Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); | |||
| 4236 | extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, | 4222 | extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, |
| 4237 | Lisp_Object); | 4223 | Lisp_Object); |
| 4238 | extern Lisp_Object listn (ptrdiff_t, Lisp_Object, ...); | 4224 | extern Lisp_Object listn (ptrdiff_t, Lisp_Object, ...); |
| 4239 | extern 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 | ||
| 4245 | enum gc_root_type | 4228 | enum gc_root_type |
| 4246 | { | 4229 | { |
| @@ -4313,18 +4296,8 @@ extern Lisp_Object make_uninit_multibyte_string (EMACS_INT, EMACS_INT); | |||
| 4313 | extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t); | 4296 | extern Lisp_Object make_string_from_bytes (const char *, ptrdiff_t, ptrdiff_t); |
| 4314 | extern Lisp_Object make_specified_string (const char *, | 4297 | extern Lisp_Object make_specified_string (const char *, |
| 4315 | ptrdiff_t, ptrdiff_t, bool); | 4298 | ptrdiff_t, ptrdiff_t, bool); |
| 4316 | extern Lisp_Object make_pure_string (const char *, ptrdiff_t, ptrdiff_t, bool); | ||
| 4317 | extern Lisp_Object make_pure_c_string (const char *, ptrdiff_t); | ||
| 4318 | extern void pin_string (Lisp_Object string); | 4299 | extern void pin_string (Lisp_Object string); |
| 4319 | 4300 | ||
| 4320 | /* Make a string allocated in pure space, use STR as string data. */ | ||
| 4321 | |||
| 4322 | INLINE Lisp_Object | ||
| 4323 | build_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 | ||
| 4337 | extern Lisp_Object pure_cons (Lisp_Object, Lisp_Object); | ||
| 4338 | extern Lisp_Object make_vector (ptrdiff_t, Lisp_Object); | 4310 | extern Lisp_Object make_vector (ptrdiff_t, Lisp_Object); |
| 4339 | extern struct Lisp_Vector *allocate_nil_vector (ptrdiff_t) | 4311 | extern struct Lisp_Vector *allocate_nil_vector (ptrdiff_t) |
| 4340 | ATTRIBUTE_RETURNS_NONNULL; | 4312 | ATTRIBUTE_RETURNS_NONNULL; |