GNU bug report logs - #69952
[PATCH] Support pdumping compiled queries by dumping their source

Previous Next

Package: emacs;

Reported by: Sergey Vinokurov <serg.foo <at> gmail.com>

Date: Sat, 23 Mar 2024 03:29:01 UTC

Severity: normal

Tags: patch

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Yuan Fu <casouri <at> gmail.com>, Andrea Corallo <acorallo <at> gnu.org>
Cc: serg.foo <at> gmail.com, dancol <at> dancol.org, 69952 <at> debbugs.gnu.org
Subject: bug#69952: [PATCH] Support pdumping compiled queries by dumping their source
Date: Wed, 22 May 2024 15:55:50 +0300
> From: Yuan Fu <casouri <at> gmail.com>
> Date: Tue, 21 May 2024 23:36:47 -0700
> Cc: serg.foo <at> gmail.com,
>  dancol <at> dancol.org,
>  69952 <at> debbugs.gnu.org
> 
> >>>> Yes, most likely a function-undefined signal, since all the treesit.c functions like treesit-query-capture or treesit-query-compile will be nonexistent. And usually the Lisp program trying to use the query would check for tree-sitter availability with treesit-available-p before trying to use any tree-sitter functions; so that signal will be usually avoided as well.
> >>> 
> >>> Can you suggest such an addition to the patch?
> >> 
> >> Let me take a look.
> >> 
> >> Yuan
> 
> Am I missing something? It seems the patch doesn’t include anything about loading a dumped query?

Looks like that, yes.

> I guess that’s the addition you’re talking about? If I want to add a special loader, where should I start?

I guess in dump_do_emacs_relocation and/or dump_do_dump_relocation?

Alternatively, perhaps it's better to define a hook via
pdumper_do_now_and_after_load_impl or
pdumper_do_now_and_after_late_load_impl, in which case the hook will
be run after loading the dump file.  This sounds easier if you can
access all the loaded queries one by one, instead of catching them
as they are being loaded.

Andrea, can you help Yuan here?  You have dealt with some of this when
you added dumping and restoring of native-compiled CUs, so I guess you
know your way better in pdumper.c.




This bug report was last modified 302 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.