Re: How can I get my act together on the backend of this compiler?

luser droog <luser.droog@gmail.com>
Fri, 12 Nov 2021 18:18:18 -0800 (PST)

          From comp.compilers

Related articles
How can I get my act together on the backend of this compiler? luser.droog@gmail.com (luser droog) (2021-10-22)
Re: How can I get my act together on the backend of this compiler? DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2021-10-23)
Re: How can I get my act together on the backend of this compiler? luser.droog@gmail.com (luser droog) (2021-11-12)
| List of all articles for this month |
From: luser droog <luser.droog@gmail.com>
Newsgroups: comp.compilers
Date: Fri, 12 Nov 2021 18:18:18 -0800 (PST)
Organization: Compilers Central
References: 21-10-039 21-10-040
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="8076"; mail-complaints-to="abuse@iecc.com"
Keywords: code, practice
Posted-Date: 12 Nov 2021 22:27:27 EST
In-Reply-To: 21-10-040

On Sunday, October 24, 2021 at 4:26:51 PM UTC-5, Hans-Peter Diettrich wrote:
> On 10/23/21 2:58 AM, luser droog wrote:
>
> > And then I don't know what I'm doing anymore. I don't know
> > where best to study up to figure out how to write a
> > super amazing code generation backend that's fancy and
> > cryptic and short like I like.
> A look at the Lua interpreter may be helpful.
>
> DoDi


Thanks. I read up on some "internals" documents and it does look really
interesting. A sliding register window over the more basic stack. 3-address
opcodes eliminating a lot MOV and LOAD instructions. A lot of this may
be directly applicable if I target something like Forth.


But it may be that I'm not ready for the backend because of the lingering
unsolved issues with the frontend. So, I've been making some progress
on a new prototype that may ease the backend effort later on. At least,
the new one will be able to give error messages instead of simply not
producing output. And that feels very important and useful.


At the same time, Budge seems like exactly what I was after. All the tricks
from SICP (probably) with less jibber jabber. If you squint through the SKI
stuff you can see that simple "ideal" compiler I was trying to imagine.
This dude explains control structures by showing how to compile them.
He doesn't even get to parsing input for 2 more chapters. All lambdas all
the way down.


With any luck I'll have the prototype fleshed out with a few examples and
then rewritten in C in a few weeks/months. *Then*, maybe I'll be able to
do a backend. At least a draft to iterate on. Wish me luck. (A silent
luckwishing is acceptable.) Thanks for your patience, everyone. I'll be back
with actual interesting content when it's ready.


droog



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.