diff options
| author | Stephen Leake | 2019-04-11 14:00:02 -0700 |
|---|---|---|
| committer | Stephen Leake | 2019-04-11 14:00:02 -0700 |
| commit | 7ba7def5caf7ec9d9bebffff489f0a658229fbda (patch) | |
| tree | e0cfcb59937ca0528fb81769d7d48a904a91f5dc /src/lisp.h | |
| parent | 7768581172e11be52b1fcd8224f4594e126bbdb7 (diff) | |
| parent | de238b39e335c6814283faa171b35145f124edf2 (diff) | |
| download | emacs-7ba7def5caf7ec9d9bebffff489f0a658229fbda.tar.gz emacs-7ba7def5caf7ec9d9bebffff489f0a658229fbda.zip | |
Merge commit 'de238b39e335c6814283faa171b35145f124edf2'
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/lisp.h b/src/lisp.h index a0a7cbdf518..681efc3b52b 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1904,9 +1904,9 @@ memclear (void *p, ptrdiff_t nbytes) | |||
| 1904 | at the end and we need to compute the number of Lisp_Object fields (the | 1904 | at the end and we need to compute the number of Lisp_Object fields (the |
| 1905 | ones that the GC needs to trace). */ | 1905 | ones that the GC needs to trace). */ |
| 1906 | 1906 | ||
| 1907 | #define PSEUDOVECSIZE(type, nonlispfield) \ | 1907 | #define PSEUDOVECSIZE(type, lastlispfield) \ |
| 1908 | (offsetof (type, nonlispfield) < header_size \ | 1908 | (offsetof (type, lastlispfield) + word_size < header_size \ |
| 1909 | ? 0 : (offsetof (type, nonlispfield) - header_size) / word_size) | 1909 | ? 0 : (offsetof (type, lastlispfield) + word_size - header_size) / word_size) |
| 1910 | 1910 | ||
| 1911 | /* Compute A OP B, using the unsigned comparison operator OP. A and B | 1911 | /* Compute A OP B, using the unsigned comparison operator OP. A and B |
| 1912 | should be integer expressions. This is not the same as | 1912 | should be integer expressions. This is not the same as |
| @@ -2109,11 +2109,14 @@ enum char_table_specials | |||
| 2109 | /* This is the number of slots that every char table must have. This | 2109 | /* This is the number of slots that every char table must have. This |
| 2110 | counts the ordinary slots and the top, defalt, parent, and purpose | 2110 | counts the ordinary slots and the top, defalt, parent, and purpose |
| 2111 | slots. */ | 2111 | slots. */ |
| 2112 | CHAR_TABLE_STANDARD_SLOTS = PSEUDOVECSIZE (struct Lisp_Char_Table, extras), | 2112 | CHAR_TABLE_STANDARD_SLOTS |
| 2113 | = (PSEUDOVECSIZE (struct Lisp_Char_Table, contents) - 1 | ||
| 2114 | + (1 << CHARTAB_SIZE_BITS_0)), | ||
| 2113 | 2115 | ||
| 2114 | /* This is an index of first Lisp_Object field in Lisp_Sub_Char_Table | 2116 | /* This is the index of the first Lisp_Object field in Lisp_Sub_Char_Table |
| 2115 | when the latter is treated as an ordinary Lisp_Vector. */ | 2117 | when the latter is treated as an ordinary Lisp_Vector. */ |
| 2116 | SUB_CHAR_TABLE_OFFSET = PSEUDOVECSIZE (struct Lisp_Sub_Char_Table, contents) | 2118 | SUB_CHAR_TABLE_OFFSET |
| 2119 | = PSEUDOVECSIZE (struct Lisp_Sub_Char_Table, contents) - 1 | ||
| 2117 | }; | 2120 | }; |
| 2118 | 2121 | ||
| 2119 | /* Sanity-check pseudovector layout. */ | 2122 | /* Sanity-check pseudovector layout. */ |
| @@ -2313,8 +2316,8 @@ struct Lisp_Hash_Table | |||
| 2313 | hash table size to reduce collisions. */ | 2316 | hash table size to reduce collisions. */ |
| 2314 | Lisp_Object index; | 2317 | Lisp_Object index; |
| 2315 | 2318 | ||
| 2316 | /* Only the fields above are traced normally by the GC. The ones below | 2319 | /* Only the fields above are traced normally by the GC. The ones after |
| 2317 | `count' are special and are either ignored by the GC or traced in | 2320 | 'index' are special and are either ignored by the GC or traced in |
| 2318 | a special way (e.g. because of weakness). */ | 2321 | a special way (e.g. because of weakness). */ |
| 2319 | 2322 | ||
| 2320 | /* Number of key/value entries in the table. */ | 2323 | /* Number of key/value entries in the table. */ |
| @@ -3940,6 +3943,11 @@ make_nil_vector (ptrdiff_t size) | |||
| 3940 | extern struct Lisp_Vector *allocate_pseudovector (int, int, int, | 3943 | extern struct Lisp_Vector *allocate_pseudovector (int, int, int, |
| 3941 | enum pvec_type); | 3944 | enum pvec_type); |
| 3942 | 3945 | ||
| 3946 | /* Allocate uninitialized pseudovector with no Lisp_Object slots. */ | ||
| 3947 | |||
| 3948 | #define ALLOCATE_PLAIN_PSEUDOVECTOR(type, tag) \ | ||
| 3949 | ((type *) allocate_pseudovector (VECSIZE (type), 0, 0, tag)) | ||
| 3950 | |||
| 3943 | /* Allocate partially initialized pseudovector where all Lisp_Object | 3951 | /* Allocate partially initialized pseudovector where all Lisp_Object |
| 3944 | slots are set to Qnil but the rest (if any) is left uninitialized. */ | 3952 | slots are set to Qnil but the rest (if any) is left uninitialized. */ |
| 3945 | 3953 | ||