aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias EngdegÄrd2023-11-25 11:26:54 +0100
committerMattias EngdegÄrd2023-11-25 17:41:16 +0100
commitf8fe0cf1bbc03889774741c622f8d768cbf431b8 (patch)
treefd18113681e0079b1fb357f55b40690a13c3544d /src
parent82bba6713fc9d5c7cc24c182236df4f16545e941 (diff)
downloademacs-f8fe0cf1bbc03889774741c622f8d768cbf431b8.tar.gz
emacs-f8fe0cf1bbc03889774741c622f8d768cbf431b8.zip
; * src/pdumper.c (dump_vectorlike): Populate switch fully.
Diffstat (limited to 'src')
-rw-r--r--src/pdumper.c75
1 files changed, 30 insertions, 45 deletions
diff --git a/src/pdumper.c b/src/pdumper.c
index 379e128e2b4..f7a7fbc2d1b 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -3004,7 +3004,8 @@ dump_vectorlike (struct dump_context *ctx,
3004# error "pvec_type changed. See CHECK_STRUCTS comment in config.h." 3004# error "pvec_type changed. See CHECK_STRUCTS comment in config.h."
3005#endif 3005#endif
3006 const struct Lisp_Vector *v = XVECTOR (lv); 3006 const struct Lisp_Vector *v = XVECTOR (lv);
3007 switch (PSEUDOVECTOR_TYPE (v)) 3007 enum pvec_type ptype = PSEUDOVECTOR_TYPE (v);
3008 switch (ptype)
3008 { 3009 {
3009 case PVEC_FONT: 3010 case PVEC_FONT:
3010 /* There are three kinds of font objects that all use PVEC_FONT, 3011 /* There are three kinds of font objects that all use PVEC_FONT,
@@ -3021,76 +3022,60 @@ dump_vectorlike (struct dump_context *ctx,
3021 case PVEC_CHAR_TABLE: 3022 case PVEC_CHAR_TABLE:
3022 case PVEC_SUB_CHAR_TABLE: 3023 case PVEC_SUB_CHAR_TABLE:
3023 case PVEC_RECORD: 3024 case PVEC_RECORD:
3024 offset = dump_vectorlike_generic (ctx, &v->header); 3025 return dump_vectorlike_generic (ctx, &v->header);
3025 break;
3026 case PVEC_BOOL_VECTOR: 3026 case PVEC_BOOL_VECTOR:
3027 offset = dump_bool_vector(ctx, v); 3027 return dump_bool_vector(ctx, v);
3028 break;
3029 case PVEC_HASH_TABLE: 3028 case PVEC_HASH_TABLE:
3030 offset = dump_hash_table (ctx, lv, offset); 3029 return dump_hash_table (ctx, lv, offset);
3031 break;
3032 case PVEC_BUFFER: 3030 case PVEC_BUFFER:
3033 offset = dump_buffer (ctx, XBUFFER (lv)); 3031 return dump_buffer (ctx, XBUFFER (lv));
3034 break;
3035 case PVEC_SUBR: 3032 case PVEC_SUBR:
3036 offset = dump_subr (ctx, XSUBR (lv)); 3033 return dump_subr (ctx, XSUBR (lv));
3037 break;
3038 case PVEC_FRAME: 3034 case PVEC_FRAME:
3039 case PVEC_WINDOW: 3035 case PVEC_WINDOW:
3040 case PVEC_PROCESS: 3036 case PVEC_PROCESS:
3041 case PVEC_TERMINAL: 3037 case PVEC_TERMINAL:
3042 offset = dump_nilled_pseudovec (ctx, &v->header); 3038 return dump_nilled_pseudovec (ctx, &v->header);
3043 break;
3044 case PVEC_MARKER: 3039 case PVEC_MARKER:
3045 offset = dump_marker (ctx, XMARKER (lv)); 3040 return dump_marker (ctx, XMARKER (lv));
3046 break;
3047 case PVEC_OVERLAY: 3041 case PVEC_OVERLAY:
3048 offset = dump_overlay (ctx, XOVERLAY (lv)); 3042 return dump_overlay (ctx, XOVERLAY (lv));
3049 break;
3050 case PVEC_FINALIZER: 3043 case PVEC_FINALIZER:
3051 offset = dump_finalizer (ctx, XFINALIZER (lv)); 3044 return dump_finalizer (ctx, XFINALIZER (lv));
3052 break;
3053 case PVEC_BIGNUM: 3045 case PVEC_BIGNUM:
3054 offset = dump_bignum (ctx, lv); 3046 return dump_bignum (ctx, lv);
3055 break;
3056#ifdef HAVE_NATIVE_COMP
3057 case PVEC_NATIVE_COMP_UNIT: 3047 case PVEC_NATIVE_COMP_UNIT:
3058 offset = dump_native_comp_unit (ctx, XNATIVE_COMP_UNIT (lv)); 3048#ifdef HAVE_NATIVE_COMP
3059 break; 3049 return dump_native_comp_unit (ctx, XNATIVE_COMP_UNIT (lv));
3060#endif 3050#endif
3061 case PVEC_WINDOW_CONFIGURATION: 3051 break;
3062 error_unsupported_dump_object (ctx, lv, "window configuration");
3063 case PVEC_OTHER:
3064 error_unsupported_dump_object (ctx, lv, "other?!");
3065 case PVEC_XWIDGET:
3066 error_unsupported_dump_object (ctx, lv, "xwidget");
3067 case PVEC_XWIDGET_VIEW:
3068 error_unsupported_dump_object (ctx, lv, "xwidget view");
3069 case PVEC_MISC_PTR:
3070 case PVEC_USER_PTR:
3071 error_unsupported_dump_object (ctx, lv, "smuggled pointers");
3072 case PVEC_THREAD: 3052 case PVEC_THREAD:
3073 if (main_thread_p (v)) 3053 if (main_thread_p (v))
3074 { 3054 {
3075 eassert (dump_object_emacs_ptr (lv)); 3055 eassert (dump_object_emacs_ptr (lv));
3076 return DUMP_OBJECT_IS_RUNTIME_MAGIC; 3056 return DUMP_OBJECT_IS_RUNTIME_MAGIC;
3077 } 3057 }
3078 error_unsupported_dump_object (ctx, lv, "thread"); 3058 break;
3059 case PVEC_WINDOW_CONFIGURATION:
3060 case PVEC_OTHER:
3061 case PVEC_XWIDGET:
3062 case PVEC_XWIDGET_VIEW:
3063 case PVEC_MISC_PTR:
3064 case PVEC_USER_PTR:
3079 case PVEC_MUTEX: 3065 case PVEC_MUTEX:
3080 error_unsupported_dump_object (ctx, lv, "mutex");
3081 case PVEC_CONDVAR: 3066 case PVEC_CONDVAR:
3082 error_unsupported_dump_object (ctx, lv, "condvar");
3083 case PVEC_SQLITE: 3067 case PVEC_SQLITE:
3084 error_unsupported_dump_object (ctx, lv, "sqlite");
3085 case PVEC_MODULE_FUNCTION: 3068 case PVEC_MODULE_FUNCTION:
3086 error_unsupported_dump_object (ctx, lv, "module function");
3087 case PVEC_SYMBOL_WITH_POS: 3069 case PVEC_SYMBOL_WITH_POS:
3088 error_unsupported_dump_object (ctx, lv, "symbol with pos"); 3070 case PVEC_FREE:
3089 default: 3071 case PVEC_TS_PARSER:
3090 error_unsupported_dump_object(ctx, lv, "weird pseudovector"); 3072 case PVEC_TS_NODE:
3073 case PVEC_TS_COMPILED_QUERY:
3074 break;
3091 } 3075 }
3092 3076 char msg[60];
3093 return offset; 3077 snprintf (msg, sizeof msg, "pseudovector type %d", ptype);
3078 error_unsupported_dump_object (ctx, lv, msg);
3094} 3079}
3095 3080
3096/* Add an object to the dump. 3081/* Add an object to the dump.