emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPS codegen


From: Gerd Möllmann
Subject: Re: MPS codegen
Date: Fri, 14 Jun 2024 08:08:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Andrea Corallo <acorallo@gnu.org> writes:

> Gerd Möllmann <gerd.moellmann@gmail.com> writes:
>
>> Helmut Eller <eller.helmut@gmail.com> writes:
>>
>>>> I think the thing I don't like is that I believe there should be only
>>>> one description of an object's layout. Be it C (struct), or be it
>>>> somethings else, from which C is generated.
>>>
>>> Sure, but that's easier said than done.
>>
>> Yeah :-). Too bad that GCC doesn't have something like Clang's Python
>> API. Somehow I don't really believe in tree-sitter for this specific
>> purpose. But what do I know...
>
> It has (I think).  I posted the link already somewhere in one of the MPS
> related threads:
>
> <https://gcc-python-plugin.readthedocs.io/en/latest/>

Thanks for the reminder. I had forgotten again. How do the GCC docs fare
wrt to GCC internals like the trees? Clang is pretty bad in that regard,
IMHO.

>
> At the time I tried to hack something to generate the code you wanted
> (well my interpretation as I never got the minimal example I asked for)
> but when Eli suggested treesitter I gave-up as I thought was a good (and
> better) suggestion.  

The Lisp code Helmut posted could serve as an example, I think. The task
would be to replace the manual object layout descriptions with ones
generated from C code. Or something like that.

BTW, if Helmut's idea wrt to loading the dump into MPS works, I'd
personally consider generation of scanning code less of an urgent
problem, although it still would be nice of course, and it might also be
nice to use for things like the dumper and the old GC. But that's
another project.

BTW, @Helmut: do you plan to work on this idea? I'm asking because I'm
in sort of a buf-fixing-only mode right now, i.e. I'm trying to make it
work well enough that I can use it and get an impression how it does
while doing something completely different from MPS. (Alas, I had to fix
one or there things to make that possible.) So, I'll probably not
tackle your dumper idea in the near future...

> Why do you think treesitter is not up to the task?

Well, I get that impression because it "only" operates on a syntactic
level. But as I said, what do I know... :-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]