From ac95aadcdc197f4fdf9f78afabfd668624206283 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 27 Jan 2024 11:15:54 -0500 Subject: [PATCH] * src/pdumper.c (Fdump_emacs_portable): Simplify commit 16a16645f524 (cherry picked from commit 3c4b6823c3f92291888a24b7fee40de82bb92d68) --- src/pdumper.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/pdumper.c b/src/pdumper.c index 6d0abc5d835..e1c71ae56c0 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -4226,22 +4226,19 @@ types. */) dump_drain_deferred_symbols (ctx); dump_drain_normal_queue (ctx); } - while (!dump_queue_empty_p (&ctx->dump_queue) - || !NILP (ctx->deferred_hash_tables) - || !NILP (ctx->deferred_symbols)); + while (!(dump_queue_empty_p (&ctx->dump_queue) + && NILP (ctx->deferred_hash_tables) + && NILP (ctx->deferred_symbols))); ctx->header.hash_list = ctx->offset; dump_hash_table_list (ctx); - do - { - dump_drain_deferred_hash_tables (ctx); - dump_drain_deferred_symbols (ctx); - dump_drain_normal_queue (ctx); - } - while (!dump_queue_empty_p (&ctx->dump_queue) - || !NILP (ctx->deferred_hash_tables) - || !NILP (ctx->deferred_symbols)); + /* `dump_hash_table_list` just adds a new vector to the dump but all its + content should already have been in the dump, so it doesn't add anything + to any queue. */ + eassert (dump_queue_empty_p (&ctx->dump_queue) + && NILP (ctx->deferred_hash_tables) + && NILP (ctx->deferred_symbols)); dump_sort_copied_objects (ctx); -- 2.39.5