From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Question about code generation
Date: Fri, 10 May 2024 14:59:39 +0200 [thread overview]
Message-ID: <m21q69n7pg.fsf@pro2.fritz.box> (raw)
In-Reply-To: <877cg1hljm.fsf@gmail.com> (Helmut Eller's message of "Fri, 10 May 2024 14:57:17 +0200")
Helmut Eller <eller.helmut@gmail.com> writes:
> On Fri, May 10 2024, Gerd Möllmann wrote:
>
>>> But I guess I'm misunderstanding what you are asking about.
>>
>> I was thinking of (making my life easier and) generating the fix_
>> functions in igc.c, as an example, from knowledge that a C parser has
>> which members are in a given struct, what's their type, Lisp_Object,
>> pointer to something interesting, ...
>>
>> Together with meta infos passed to a code generator this could be used
>> for all sorts of things, I guess.
>
> Would be nice to write things like:
>
> struct foo {
> void* bar [[emacs::igc_fix_obj]];
> }
Yeah, exactly!
>
> and then run a gcc or clang plugin over it and generate the needed code.
>
> Can libgccjit be used to parse C code and could we write the plugin in
> Emacs Lisp? That would be fun.
next prev parent reply other threads:[~2024-05-10 12:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 9:33 Question about code generation Gerd Möllmann
2024-05-10 10:35 ` Eli Zaretskii
2024-05-10 11:38 ` Gerd Möllmann
2024-05-10 12:57 ` Helmut Eller
2024-05-10 12:59 ` Gerd Möllmann [this message]
2024-05-10 15:16 ` Eli Zaretskii
2024-05-10 17:00 ` Andrea Corallo
2024-05-10 17:21 ` tomas
2024-05-10 17:35 ` Andrea Corallo
2024-05-10 17:38 ` Andrea Corallo
2024-05-10 17:38 ` tomas
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=m21q69n7pg.fsf@pro2.fritz.box \
--to=gerd.moellmann@gmail.com \
--cc=eliz@gnu.org \
--cc=eller.helmut@gmail.com \
--cc=emacs-devel@gnu.org \
/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.