So I’ve been really interested in how to organize compiler architecture and codebase. Right now, the experimental toylang compiler is a jarbled mess with no direction. Spaghetti is not the term I would use to describe it honestly. Here is an example of the mess. Although, I often think with the right mindset, I have even worked out the overall pipeline architecture for Beagle’s compiler here.
However, this got me thinking about the practice whether this kind of pipeline is realistic. I then looked at Rust’s architecture and seems like it’s similar to what I had in mind. I had finally just done a first refactor of the toylang compiler to take advantage of the newest features of kotlinx-llvm but I seem to have only made things more complicated for myself so I will have to just redo the codebase for it to fully understand the design and implementation of a compiler before I start on Beagle’s compiler because I don’t want to go through this with Beagle, I’d rather the process be as painless with it as possible.