aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2019-04-10 19:42:37 -0700
committerPaul Eggert2019-04-10 21:00:47 -0700
commit9994bf17cf532f2e1d4310341da7180342202191 (patch)
treec1811a216072e3c83ed51f7eaa4e6f2bfa647483 /src
parent0627a8d7bc6ffa29d7a503fd36e760778ecb9fa1 (diff)
downloademacs-9994bf17cf532f2e1d4310341da7180342202191.tar.gz
emacs-9994bf17cf532f2e1d4310341da7180342202191.zip
Bring back dmpstruct.h
Bring back the dmpstruct.h checking, and use it when --enable-checking=structs is specified. The checking can be helpful to some developers, although it gets in the way of others and is not needed for ordinary tarball builds. * src/dmpstruct.awk: Restore this file, with mode 644 not 755. * configure.ac: New option-arg --enable-checking=structs, implied by --enable-checking. (CHECK_STRUCTS): New macro and var. * src/Makefile.in (CHECK_STRUCTS): New macro. (dmpstruct_headers, dmpstruct.h, dmpstruct.h): Restore these macros and rules. (pdumper.o): Restore this dependency if $(CHECK_STRUCTS) is true. (mostlyclean): Remove dmpstruct.h. * src/pdumper.c [CHECK_STRUCTS]: Include dmpstruct.h, and restore checks against hashes.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in13
-rw-r--r--src/dmpstruct.awk45
-rw-r--r--src/pdumper.c81
3 files changed, 138 insertions, 1 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 6d6308fde6d..2348c8dae4c 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -331,6 +331,7 @@ BUILD_DETAILS = @BUILD_DETAILS@
331UNEXEC_OBJ = @UNEXEC_OBJ@ 331UNEXEC_OBJ = @UNEXEC_OBJ@
332 332
333DUMPING=@DUMPING@ 333DUMPING=@DUMPING@
334CHECK_STRUCTS = @CHECK_STRUCTS@
334 335
335# 'make' verbosity. 336# 'make' verbosity.
336AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 337AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
@@ -456,6 +457,16 @@ ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj)
456all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES) 457all: emacs$(EXEEXT) $(pdmp) $(OTHER_FILES)
457.PHONY: all 458.PHONY: all
458 459
460dmpstruct_headers=$(srcdir)/lisp.h $(srcdir)/buffer.h \
461 $(srcdir)/intervals.h $(srcdir)/charset.h $(srcdir)/bignum.h
462ifeq ($(CHECK_STRUCTS),true)
463pdumper.o: dmpstruct.h
464endif
465dmpstruct.h: $(srcdir)/dmpstruct.awk
466dmpstruct.h: $(libsrc)/make-fingerprint$(EXEEXT) $(dmpstruct_headers)
467 $(AM_V_GEN)POSIXLY_CORRECT=1 awk -f $(srcdir)/dmpstruct.awk \
468 $(dmpstruct_headers) > $@
469
459AUTO_DEPEND = @AUTO_DEPEND@ 470AUTO_DEPEND = @AUTO_DEPEND@
460DEPDIR = deps 471DEPDIR = deps
461ifeq ($(AUTO_DEPEND),yes) 472ifeq ($(AUTO_DEPEND),yes)
@@ -665,7 +676,7 @@ ns-app: emacs$(EXEEXT) $(pdmp)
665 676
666mostlyclean: 677mostlyclean:
667 rm -f temacs$(EXEEXT) core ./*.core \#* ./*.o 678 rm -f temacs$(EXEEXT) core ./*.core \#* ./*.o
668 rm -f fingerprint.c 679 rm -f dmpstruct.h fingerprint.c
669 rm -f emacs.pdmp 680 rm -f emacs.pdmp
670 rm -f ../etc/DOC 681 rm -f ../etc/DOC
671 rm -f bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp) 682 rm -f bootstrap-emacs$(EXEEXT) $(bootstrap_pdmp)
diff --git a/src/dmpstruct.awk b/src/dmpstruct.awk
new file mode 100644
index 00000000000..55626cf8b21
--- /dev/null
+++ b/src/dmpstruct.awk
@@ -0,0 +1,45 @@
1# Copyright (C) 2018-2019 Free Software Foundation, Inc.
2#
3# This file is part of GNU Emacs.
4#
5# GNU Emacs is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or (at
8# your option) any later version.
9#
10# GNU Emacs is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
17
18BEGIN {
19 print "/* Generated by dmpstruct.awk */"
20 print "#ifndef EMACS_DMPSTRUCT_H"
21 print "#define EMACS_DMPSTRUCT_H"
22 struct_name = ""
23 tmpfile = "dmpstruct.tmp"
24}
25# Match a type followed by optional syntactic whitespace
26/^(enum|struct|union) [a-zA-Z0-9_]+([\t ]|\/\*.*\*\/)*$/ {
27 struct_name = $2
28 close (tmpfile)
29}
30/^(enum|struct|union) [a-zA-Z0-9_]+([\t ]|\/\*.*\*\/)*$/, /^( )?};$/ {
31 print $0 > tmpfile
32}
33/^( )?} *(GCALIGNED_STRUCT)? *;$/ {
34 if (struct_name != "") {
35 fflush (tmpfile)
36 cmd = "../lib-src/make-fingerprint -r " tmpfile
37 cmd | getline hash
38 close (cmd)
39 printf "#define HASH_%s_%.10s\n", struct_name, hash
40 struct_name = ""
41 }
42}
43END {
44 print "#endif /* EMACS_DMPSTRUCT_H */"
45}
diff --git a/src/pdumper.c b/src/pdumper.c
index 3aa941221db..600c5b3ca3d 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -46,6 +46,10 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
46#include "thread.h" 46#include "thread.h"
47#include "bignum.h" 47#include "bignum.h"
48 48
49#ifdef CHECK_STRUCTS
50# include "dmpstruct.h"
51#endif
52
49/* 53/*
50 TODO: 54 TODO:
51 55
@@ -2029,6 +2033,9 @@ dump_pseudovector_lisp_fields (struct dump_context *ctx,
2029static dump_off 2033static dump_off
2030dump_cons (struct dump_context *ctx, const struct Lisp_Cons *cons) 2034dump_cons (struct dump_context *ctx, const struct Lisp_Cons *cons)
2031{ 2035{
2036#if CHECK_STRUCTS && !defined (HASH_Lisp_Cons_00EEE63F67)
2037# error "Lisp_Cons changed. See CHECK_STRUCTS comment."
2038#endif
2032 struct Lisp_Cons out; 2039 struct Lisp_Cons out;
2033 dump_object_start (ctx, &out, sizeof (out)); 2040 dump_object_start (ctx, &out, sizeof (out));
2034 dump_field_lv (ctx, &out, cons, &cons->u.s.car, WEIGHT_STRONG); 2041 dump_field_lv (ctx, &out, cons, &cons->u.s.car, WEIGHT_STRONG);
@@ -2041,6 +2048,9 @@ dump_interval_tree (struct dump_context *ctx,
2041 INTERVAL tree, 2048 INTERVAL tree,
2042 dump_off parent_offset) 2049 dump_off parent_offset)
2043{ 2050{
2051#if CHECK_STRUCTS && !defined (HASH_interval_1B38941C37)
2052# error "interval changed. See CHECK_STRUCTS comment."
2053#endif
2044 /* TODO: output tree breadth-first? */ 2054 /* TODO: output tree breadth-first? */
2045 struct interval out; 2055 struct interval out;
2046 dump_object_start (ctx, &out, sizeof (out)); 2056 dump_object_start (ctx, &out, sizeof (out));
@@ -2082,6 +2092,9 @@ dump_interval_tree (struct dump_context *ctx,
2082static dump_off 2092static dump_off
2083dump_string (struct dump_context *ctx, const struct Lisp_String *string) 2093dump_string (struct dump_context *ctx, const struct Lisp_String *string)
2084{ 2094{
2095#if CHECK_STRUCTS && !defined (HASH_Lisp_String_86FEA6EC7C)
2096# error "Lisp_String changed. See CHECK_STRUCTS comment."
2097#endif
2085 /* If we have text properties, write them _after_ the string so that 2098 /* If we have text properties, write them _after_ the string so that
2086 at runtime, the prefetcher and cache will DTRT. (We access the 2099 at runtime, the prefetcher and cache will DTRT. (We access the
2087 string before its properties.). 2100 string before its properties.).
@@ -2125,6 +2138,10 @@ dump_string (struct dump_context *ctx, const struct Lisp_String *string)
2125static dump_off 2138static dump_off
2126dump_marker (struct dump_context *ctx, const struct Lisp_Marker *marker) 2139dump_marker (struct dump_context *ctx, const struct Lisp_Marker *marker)
2127{ 2140{
2141#if CHECK_STRUCTS && !defined (HASH_Lisp_Marker_642DBAF866)
2142# error "Lisp_Marker changed. See CHECK_STRUCTS comment."
2143#endif
2144
2128 START_DUMP_PVEC (ctx, &marker->header, struct Lisp_Marker, out); 2145 START_DUMP_PVEC (ctx, &marker->header, struct Lisp_Marker, out);
2129 dump_pseudovector_lisp_fields (ctx, &out->header, &marker->header); 2146 dump_pseudovector_lisp_fields (ctx, &out->header, &marker->header);
2130 DUMP_FIELD_COPY (out, marker, need_adjustment); 2147 DUMP_FIELD_COPY (out, marker, need_adjustment);
@@ -2144,6 +2161,9 @@ dump_marker (struct dump_context *ctx, const struct Lisp_Marker *marker)
2144static dump_off 2161static dump_off
2145dump_overlay (struct dump_context *ctx, const struct Lisp_Overlay *overlay) 2162dump_overlay (struct dump_context *ctx, const struct Lisp_Overlay *overlay)
2146{ 2163{
2164#if CHECK_STRUCTS && !defined (HASH_Lisp_Overlay_72EADA9882)
2165# error "Lisp_Overlay changed. See CHECK_STRUCTS comment."
2166#endif
2147 START_DUMP_PVEC (ctx, &overlay->header, struct Lisp_Overlay, out); 2167 START_DUMP_PVEC (ctx, &overlay->header, struct Lisp_Overlay, out);
2148 dump_pseudovector_lisp_fields (ctx, &out->header, &overlay->header); 2168 dump_pseudovector_lisp_fields (ctx, &out->header, &overlay->header);
2149 dump_field_lv_rawptr (ctx, out, overlay, &overlay->next, 2169 dump_field_lv_rawptr (ctx, out, overlay, &overlay->next,
@@ -2169,6 +2189,9 @@ static dump_off
2169dump_finalizer (struct dump_context *ctx, 2189dump_finalizer (struct dump_context *ctx,
2170 const struct Lisp_Finalizer *finalizer) 2190 const struct Lisp_Finalizer *finalizer)
2171{ 2191{
2192#if CHECK_STRUCTS && !defined (HASH_Lisp_Finalizer_D58E647CB8)
2193# error "Lisp_Finalizer changed. See CHECK_STRUCTS comment."
2194#endif
2172 START_DUMP_PVEC (ctx, &finalizer->header, struct Lisp_Finalizer, out); 2195 START_DUMP_PVEC (ctx, &finalizer->header, struct Lisp_Finalizer, out);
2173 /* Do _not_ call dump_pseudovector_lisp_fields here: we dump the 2196 /* Do _not_ call dump_pseudovector_lisp_fields here: we dump the
2174 only Lisp field, finalizer->function, manually, so we can give it 2197 only Lisp field, finalizer->function, manually, so we can give it
@@ -2188,6 +2211,9 @@ struct bignum_reload_info
2188static dump_off 2211static dump_off
2189dump_bignum (struct dump_context *ctx, Lisp_Object object) 2212dump_bignum (struct dump_context *ctx, Lisp_Object object)
2190{ 2213{
2214#if CHECK_STRUCTS && !defined (HASH_Lisp_Bignum_661945DE2B)
2215# error "Lisp_Bignum changed. See CHECK_STRUCTS comment."
2216#endif
2191 const struct Lisp_Bignum *bignum = XBIGNUM (object); 2217 const struct Lisp_Bignum *bignum = XBIGNUM (object);
2192 START_DUMP_PVEC (ctx, &bignum->header, struct Lisp_Bignum, out); 2218 START_DUMP_PVEC (ctx, &bignum->header, struct Lisp_Bignum, out);
2193 verify (sizeof (out->value) >= sizeof (struct bignum_reload_info)); 2219 verify (sizeof (out->value) >= sizeof (struct bignum_reload_info));
@@ -2223,6 +2249,9 @@ dump_bignum (struct dump_context *ctx, Lisp_Object object)
2223static dump_off 2249static dump_off
2224dump_float (struct dump_context *ctx, const struct Lisp_Float *lfloat) 2250dump_float (struct dump_context *ctx, const struct Lisp_Float *lfloat)
2225{ 2251{
2252#if CHECK_STRUCTS && !defined (HASH_Lisp_Float_50A7B216D9)
2253# error "Lisp_Float changed. See CHECK_STRUCTS comment."
2254#endif
2226 eassert (ctx->header.cold_start); 2255 eassert (ctx->header.cold_start);
2227 struct Lisp_Float out; 2256 struct Lisp_Float out;
2228 dump_object_start (ctx, &out, sizeof (out)); 2257 dump_object_start (ctx, &out, sizeof (out));
@@ -2233,6 +2262,9 @@ dump_float (struct dump_context *ctx, const struct Lisp_Float *lfloat)
2233static dump_off 2262static dump_off
2234dump_fwd_int (struct dump_context *ctx, const struct Lisp_Intfwd *intfwd) 2263dump_fwd_int (struct dump_context *ctx, const struct Lisp_Intfwd *intfwd)
2235{ 2264{
2265#if CHECK_STRUCTS && !defined HASH_Lisp_Intfwd_4D887A7387
2266# error "Lisp_Intfwd changed. See CHECK_STRUCTS comment."
2267#endif
2236 dump_emacs_reloc_immediate_intmax_t (ctx, intfwd->intvar, *intfwd->intvar); 2268 dump_emacs_reloc_immediate_intmax_t (ctx, intfwd->intvar, *intfwd->intvar);
2237 struct Lisp_Intfwd out; 2269 struct Lisp_Intfwd out;
2238 dump_object_start (ctx, &out, sizeof (out)); 2270 dump_object_start (ctx, &out, sizeof (out));
@@ -2244,6 +2276,9 @@ dump_fwd_int (struct dump_context *ctx, const struct Lisp_Intfwd *intfwd)
2244static dump_off 2276static dump_off
2245dump_fwd_bool (struct dump_context *ctx, const struct Lisp_Boolfwd *boolfwd) 2277dump_fwd_bool (struct dump_context *ctx, const struct Lisp_Boolfwd *boolfwd)
2246{ 2278{
2279#if CHECK_STRUCTS && !defined (HASH_Lisp_Boolfwd_0EA1C7ADCC)
2280# error "Lisp_Boolfwd changed. See CHECK_STRUCTS comment."
2281#endif
2247 dump_emacs_reloc_immediate_bool (ctx, boolfwd->boolvar, *boolfwd->boolvar); 2282 dump_emacs_reloc_immediate_bool (ctx, boolfwd->boolvar, *boolfwd->boolvar);
2248 struct Lisp_Boolfwd out; 2283 struct Lisp_Boolfwd out;
2249 dump_object_start (ctx, &out, sizeof (out)); 2284 dump_object_start (ctx, &out, sizeof (out));
@@ -2255,6 +2290,9 @@ dump_fwd_bool (struct dump_context *ctx, const struct Lisp_Boolfwd *boolfwd)
2255static dump_off 2290static dump_off
2256dump_fwd_obj (struct dump_context *ctx, const struct Lisp_Objfwd *objfwd) 2291dump_fwd_obj (struct dump_context *ctx, const struct Lisp_Objfwd *objfwd)
2257{ 2292{
2293#if CHECK_STRUCTS && !defined (HASH_Lisp_Objfwd_45D3E513DC)
2294# error "Lisp_Objfwd changed. See CHECK_STRUCTS comment."
2295#endif
2258 if (NILP (Fgethash (dump_off_to_lisp (emacs_offset (objfwd->objvar)), 2296 if (NILP (Fgethash (dump_off_to_lisp (emacs_offset (objfwd->objvar)),
2259 ctx->staticpro_table, 2297 ctx->staticpro_table,
2260 Qnil))) 2298 Qnil)))
@@ -2270,6 +2308,9 @@ static dump_off
2270dump_fwd_buffer_obj (struct dump_context *ctx, 2308dump_fwd_buffer_obj (struct dump_context *ctx,
2271 const struct Lisp_Buffer_Objfwd *buffer_objfwd) 2309 const struct Lisp_Buffer_Objfwd *buffer_objfwd)
2272{ 2310{
2311#if CHECK_STRUCTS && !defined (HASH_Lisp_Buffer_Objfwd_13CA6B04FC)
2312# error "Lisp_Buffer_Objfwd changed. See CHECK_STRUCTS comment."
2313#endif
2273 struct Lisp_Buffer_Objfwd out; 2314 struct Lisp_Buffer_Objfwd out;
2274 dump_object_start (ctx, &out, sizeof (out)); 2315 dump_object_start (ctx, &out, sizeof (out));
2275 DUMP_FIELD_COPY (&out, buffer_objfwd, type); 2316 DUMP_FIELD_COPY (&out, buffer_objfwd, type);
@@ -2283,6 +2324,9 @@ static dump_off
2283dump_fwd_kboard_obj (struct dump_context *ctx, 2324dump_fwd_kboard_obj (struct dump_context *ctx,
2284 const struct Lisp_Kboard_Objfwd *kboard_objfwd) 2325 const struct Lisp_Kboard_Objfwd *kboard_objfwd)
2285{ 2326{
2327#if CHECK_STRUCTS && !defined (HASH_Lisp_Kboard_Objfwd_CAA7E71069)
2328# error "Lisp_Intfwd changed. See CHECK_STRUCTS comment."
2329#endif
2286 struct Lisp_Kboard_Objfwd out; 2330 struct Lisp_Kboard_Objfwd out;
2287 dump_object_start (ctx, &out, sizeof (out)); 2331 dump_object_start (ctx, &out, sizeof (out));
2288 DUMP_FIELD_COPY (&out, kboard_objfwd, type); 2332 DUMP_FIELD_COPY (&out, kboard_objfwd, type);
@@ -2293,6 +2337,9 @@ dump_fwd_kboard_obj (struct dump_context *ctx,
2293static dump_off 2337static dump_off
2294dump_fwd (struct dump_context *ctx, lispfwd fwd) 2338dump_fwd (struct dump_context *ctx, lispfwd fwd)
2295{ 2339{
2340#if CHECK_STRUCTS && !defined (HASH_Lisp_Fwd_Type_9CBA6EE55E)
2341# error "Lisp_Fwd_Type changed. See CHECK_STRUCTS comment."
2342#endif
2296 void const *p = fwd.fwdptr; 2343 void const *p = fwd.fwdptr;
2297 dump_off offset; 2344 dump_off offset;
2298 2345
@@ -2324,6 +2371,9 @@ static dump_off
2324dump_blv (struct dump_context *ctx, 2371dump_blv (struct dump_context *ctx,
2325 const struct Lisp_Buffer_Local_Value *blv) 2372 const struct Lisp_Buffer_Local_Value *blv)
2326{ 2373{
2374#if CHECK_STRUCTS && !defined HASH_Lisp_Buffer_Local_Value_3C363FAC3C
2375# error "Lisp_Buffer_Local_Value changed. See CHECK_STRUCTS comment."
2376#endif
2327 struct Lisp_Buffer_Local_Value out; 2377 struct Lisp_Buffer_Local_Value out;
2328 dump_object_start (ctx, &out, sizeof (out)); 2378 dump_object_start (ctx, &out, sizeof (out));
2329 DUMP_FIELD_COPY (&out, blv, local_if_set); 2379 DUMP_FIELD_COPY (&out, blv, local_if_set);
@@ -2386,6 +2436,13 @@ dump_symbol (struct dump_context *ctx,
2386 Lisp_Object object, 2436 Lisp_Object object,
2387 dump_off offset) 2437 dump_off offset)
2388{ 2438{
2439#if CHECK_STRUCTS && !defined HASH_Lisp_Symbol_999DC26DEC
2440# error "Lisp_Symbol changed. See CHECK_STRUCTS comment."
2441#endif
2442#if CHECK_STRUCTS && !defined (HASH_symbol_redirect_ADB4F5B113)
2443# error "symbol_redirect changed. See CHECK_STRUCTS comment."
2444#endif
2445
2389 if (ctx->flags.defer_symbols) 2446 if (ctx->flags.defer_symbols)
2390 { 2447 {
2391 if (offset != DUMP_OBJECT_ON_SYMBOL_QUEUE) 2448 if (offset != DUMP_OBJECT_ON_SYMBOL_QUEUE)
@@ -2475,6 +2532,9 @@ static dump_off
2475dump_vectorlike_generic (struct dump_context *ctx, 2532dump_vectorlike_generic (struct dump_context *ctx,
2476 const union vectorlike_header *header) 2533 const union vectorlike_header *header)
2477{ 2534{
2535#if CHECK_STRUCTS && !defined (HASH_vectorlike_header_00A5A4BFB2)
2536# error "vectorlike_header changed. See CHECK_STRUCTS comment."
2537#endif
2478 const struct Lisp_Vector *v = (const struct Lisp_Vector *) header; 2538 const struct Lisp_Vector *v = (const struct Lisp_Vector *) header;
2479 ptrdiff_t size = header->size; 2539 ptrdiff_t size = header->size;
2480 enum pvec_type pvectype = PSEUDOVECTOR_TYPE (v); 2540 enum pvec_type pvectype = PSEUDOVECTOR_TYPE (v);
@@ -2632,6 +2692,9 @@ dump_hash_table (struct dump_context *ctx,
2632 Lisp_Object object, 2692 Lisp_Object object,
2633 dump_off offset) 2693 dump_off offset)
2634{ 2694{
2695#if CHECK_STRUCTS && !defined HASH_Lisp_Hash_Table_EF95ED06FF
2696# error "Lisp_Hash_Table changed. See CHECK_STRUCTS comment."
2697#endif
2635 const struct Lisp_Hash_Table *hash_in = XHASH_TABLE (object); 2698 const struct Lisp_Hash_Table *hash_in = XHASH_TABLE (object);
2636 bool is_stable = dump_hash_table_stable_p (hash_in); 2699 bool is_stable = dump_hash_table_stable_p (hash_in);
2637 /* If the hash table is likely to be modified in memory (either 2700 /* If the hash table is likely to be modified in memory (either
@@ -2697,6 +2760,9 @@ dump_hash_table (struct dump_context *ctx,
2697static dump_off 2760static dump_off
2698dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) 2761dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer)
2699{ 2762{
2763#if CHECK_STRUCTS && !defined HASH_buffer_E34A11C6B9
2764# error "buffer changed. See CHECK_STRUCTS comment."
2765#endif
2700 struct buffer munged_buffer = *in_buffer; 2766 struct buffer munged_buffer = *in_buffer;
2701 struct buffer *buffer = &munged_buffer; 2767 struct buffer *buffer = &munged_buffer;
2702 2768
@@ -2830,6 +2896,9 @@ dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer)
2830static dump_off 2896static dump_off
2831dump_bool_vector (struct dump_context *ctx, const struct Lisp_Vector *v) 2897dump_bool_vector (struct dump_context *ctx, const struct Lisp_Vector *v)
2832{ 2898{
2899#if CHECK_STRUCTS && !defined (HASH_Lisp_Vector_3091289B35)
2900# error "Lisp_Vector changed. See CHECK_STRUCTS comment."
2901#endif
2833 /* No relocation needed, so we don't need dump_object_start. */ 2902 /* No relocation needed, so we don't need dump_object_start. */
2834 dump_align_output (ctx, DUMP_ALIGNMENT); 2903 dump_align_output (ctx, DUMP_ALIGNMENT);
2835 eassert (ctx->offset >= ctx->header.cold_start); 2904 eassert (ctx->offset >= ctx->header.cold_start);
@@ -2844,6 +2913,9 @@ dump_bool_vector (struct dump_context *ctx, const struct Lisp_Vector *v)
2844static dump_off 2913static dump_off
2845dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr) 2914dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr)
2846{ 2915{
2916#if CHECK_STRUCTS && !defined (HASH_Lisp_Subr_594AB72B54)
2917# error "Lisp_Subr changed. See CHECK_STRUCTS comment."
2918#endif
2847 struct Lisp_Subr out; 2919 struct Lisp_Subr out;
2848 dump_object_start (ctx, &out, sizeof (out)); 2920 dump_object_start (ctx, &out, sizeof (out));
2849 DUMP_FIELD_COPY (&out, subr, header.size); 2921 DUMP_FIELD_COPY (&out, subr, header.size);
@@ -2880,6 +2952,9 @@ dump_vectorlike (struct dump_context *ctx,
2880 Lisp_Object lv, 2952 Lisp_Object lv,
2881 dump_off offset) 2953 dump_off offset)
2882{ 2954{
2955#if CHECK_STRUCTS && !defined (HASH_pvec_type_549C833A54)
2956# error "pvec_type changed. See CHECK_STRUCTS comment."
2957#endif
2883 const struct Lisp_Vector *v = XVECTOR (lv); 2958 const struct Lisp_Vector *v = XVECTOR (lv);
2884 switch (PSEUDOVECTOR_TYPE (v)) 2959 switch (PSEUDOVECTOR_TYPE (v))
2885 { 2960 {
@@ -2987,6 +3062,9 @@ dump_vectorlike (struct dump_context *ctx,
2987static dump_off 3062static dump_off
2988dump_object (struct dump_context *ctx, Lisp_Object object) 3063dump_object (struct dump_context *ctx, Lisp_Object object)
2989{ 3064{
3065#if CHECK_STRUCTS && !defined (HASH_Lisp_Type_E2AD97D3F7)
3066# error "Lisp_Type changed. See CHECK_STRUCTS comment."
3067#endif
2990#ifdef ENABLE_CHECKING 3068#ifdef ENABLE_CHECKING
2991 /* Vdead is extern only when ENABLE_CHECKING. */ 3069 /* Vdead is extern only when ENABLE_CHECKING. */
2992 eassert (!EQ (object, Vdead)); 3070 eassert (!EQ (object, Vdead));
@@ -3089,6 +3167,9 @@ dump_object_for_offset (struct dump_context *ctx, Lisp_Object object)
3089static dump_off 3167static dump_off
3090dump_charset (struct dump_context *ctx, int cs_i) 3168dump_charset (struct dump_context *ctx, int cs_i)
3091{ 3169{
3170#if CHECK_STRUCTS && !defined (HASH_charset_317C49E291)
3171# error "charset changed. See CHECK_STRUCTS comment."
3172#endif
3092 dump_align_output (ctx, alignof (int)); 3173 dump_align_output (ctx, alignof (int));
3093 const struct charset *cs = charset_table + cs_i; 3174 const struct charset *cs = charset_table + cs_i;
3094 struct charset out; 3175 struct charset out;