From: Yuan Fu <casouri@gmail.com>
To: Andrea Corallo <acorallo@gnu.org>
Cc: Eli Zaretskii <eliz@gnu.org>,
Daniel Colascione <dancol@dancol.org>,
69952@debbugs.gnu.org, serg.foo@gmail.com
Subject: bug#69952: [PATCH] Support pdumping compiled queries by dumping their source
Date: Sat, 1 Jun 2024 10:07:38 -0700 [thread overview]
Message-ID: <CC10931C-9448-47E7-93EC-7D74AC85B49D@gmail.com> (raw)
In-Reply-To: <yp11q5ktw37.fsf@fencepost.gnu.org>
> On May 29, 2024, at 9:35 AM, Andrea Corallo <acorallo@gnu.org> wrote:
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
>>> From: Yuan Fu <casouri@gmail.com>
>>> Date: Tue, 21 May 2024 23:36:47 -0700
>>> Cc: serg.foo@gmail.com,
>>> dancol@dancol.org,
>>> 69952@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?
>
> Yes that's correct.
>
>> 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.
>
> Note also that if one decides to execute code at LATE_RELOCS or
> VERY_LATE_RELOCS time he has the lisp machinery at disposal (including
> allocation), but native code becomes functional only after
> VERY_LATE_RELOCS relocs are done (not sure this can impact you here).
>
> On this might be necessary if Yuan goes for the hook and needs native
> Lisp code to be working, to add
> 'pdumper_do_now_and_after_very_late_load_impl' (which I think I didn't
> bothered at the time).
>
> Andrea
Thanks to you both! I’ll see what I can come up with.
Yuan
next prev parent reply other threads:[~2024-06-01 17:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-23 3:27 bug#69952: [PATCH] Support pdumping compiled queries by dumping their source Sergey Vinokurov
2024-03-23 7:08 ` Eli Zaretskii
2024-03-23 12:53 ` Sergey Vinokurov
2024-03-23 13:09 ` Eli Zaretskii
2024-04-13 7:41 ` Eli Zaretskii
2024-04-20 8:08 ` Yuan Fu
2024-04-20 9:32 ` Eli Zaretskii
2024-04-20 22:50 ` Yuan Fu
2024-04-21 4:53 ` Eli Zaretskii
2024-04-21 23:41 ` Yuan Fu
2024-04-22 5:47 ` Eli Zaretskii
2024-04-22 6:04 ` Yuan Fu
2024-04-22 6:18 ` Eli Zaretskii
2024-04-22 6:25 ` Yuan Fu
2024-05-04 9:39 ` Eli Zaretskii
2024-05-04 21:29 ` Yuan Fu
2024-05-18 8:38 ` Eli Zaretskii
2024-05-22 6:36 ` Yuan Fu
2024-05-22 12:55 ` Eli Zaretskii
2024-05-29 16:35 ` Andrea Corallo
2024-06-01 17:07 ` Yuan Fu [this message]
2024-06-15 7:59 ` Eli Zaretskii
2024-06-19 6:25 ` Yuan Fu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CC10931C-9448-47E7-93EC-7D74AC85B49D@gmail.com \
--to=casouri@gmail.com \
--cc=69952@debbugs.gnu.org \
--cc=acorallo@gnu.org \
--cc=dancol@dancol.org \
--cc=eliz@gnu.org \
--cc=serg.foo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.