Compiler of Cool 2020 (a small Scala subset) into x86-64 assembly, in F#
You might find [CS 6120: Advanced Compilers: The Self-Guided Online Course] interesting. I'm slowly working through it, but basically its focus is intermediate representations, optimizations, etc. A link to the course was on the first page of HN some time ago.
Also -- and you knew it was coming -- I've written a [toy-compiler of a Scala subset] myself :)
I'm new to F# and writing compilers, so I'm sure the code is full of rookie mistakes. Still, it works and does generate assembly and executables for Linux and Windows.
A homebrew 16-bit CPU with a homebrew Unix-like-ish operating system.
Thanks, this is serendipitous timing. I definitely plan to watch the YouTube playlist.
I'm designing a simple CPU at the moment and one of the things that keeps me awake at night is thinking about how to make a compiler for it.
It only supports 64K words of RAM (and I'm not planning to implement bank switching), and I definitely want the compiler to be self-hosting on my CPU, so retargeting LLVM or similar won't be applicable.
I've looked at Small-C, Cowgol, and PL/0 which all target similar goals.
OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.
An educational software system of a tiny self-compiling C compiler, a tiny self-executing RISC-V emulator, and a tiny self-hosting RISC-V hypervisor.
Maybe this is interesting to you as well? https://github.com/cksystemsteaching/selfie
The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.
I have to keep up with Ruby changes.
But even for example the parser in clang doesn't seem to be touched very often.
Take a look at the commits there and see how much each changes the parser vs the rest of the compiler.
Also, at the bottom of page 2 for parser changes you're already all the way back in 2017!
A self-hosting and educational C compiler
I'm looking at this one for a CPU design I've been working on. :)
Shecc: Self-hosting and educational C compiler
1 project | news.ycombinator.com | 22 Jan 2021
shecc: self-hosting and educational C compiler
1 project | reddit.com/r/Compilers | 20 Jan 2021
shecc: Self-hosting and educational C compiler
1 project | news.ycombinator.com | 20 Jan 2021
ECTS Chaos an österreichischen Universitäten
2 projects | reddit.com/r/Austria | 19 Jan 2021
Picking atomic instruction primitives for a compiler backend
2 projects | reddit.com/r/Compilers | 14 Jan 2022