all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Helmut Eller <eller.helmut@gmail.com>, Andrea Corallo <acorallo@gnu.org>
Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org
Subject: Re: Question about code generation
Date: Fri, 10 May 2024 18:16:19 +0300	[thread overview]
Message-ID: <86h6f54rzw.fsf@gnu.org> (raw)
In-Reply-To: <877cg1hljm.fsf@gmail.com> (message from Helmut Eller on Fri, 10 May 2024 14:57:17 +0200)

> From: Helmut Eller <eller.helmut@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
> Date: Fri, 10 May 2024 14:57:17 +0200
> 
> 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]];
> }
> 
> 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.

AFAIU, libgccjit needs GIMPL, and you drive it by calling the
respective functions from libgccjit.  But Andrea will tell for sure.



  parent reply	other threads:[~2024-05-10 15:16 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
2024-05-10 15:16       ` Eli Zaretskii [this message]
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=86h6f54rzw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=acorallo@gnu.org \
    --cc=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@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.