> Simplicity is usually achieved by dividing tasks into small, manageable subtasks. There is even an extreme nanopass compiler design used for studying compiler topics in education.
I noticed that they use JavaScript to modify the hash string in the URL. Here is the probably root cause:
There is an H2 heading between "Lightweight JIT compiler project goals" and "The current state of the MIR project". That h2 contains the Hoover Dams image and has an id generated from empty content because the content is just image: <h2 id="-h2"></h2>. When you scroll near that image, the javascript tries to update the url but that broken ID caused it to set the empty ID ("#"), thus jumping to top.
You can verify this by open the table of contents bar and see an untitled section. Whatever CMS they are using, it didn't handle the empty H2 correctly. Few additional considerations:
1. The article author should never produce an H2 with only an image in it.
2. The image should have an `alt` label to be accessible.
3. CMS should use `alt` label or file name to generate the ID when the H2 has no other textual content.
Additionally, LLVM has MIR (Machine IR), which is what Zig's also stands for. There's a lot of M-starting compiler intermediate representations. This Ruby MIR is Medium Internal Representation. Rust's is Mid-level IR. Similarly, there's MLIR, which is usually expanded to Multi-Level Intermediate Representation.
With these kinds of projects there is a lot of work to be done and I feel it's difficult to get started reading a codebase for a JIT compiler or gcc or LLVM.
> "The implementation should be simple too at less than 10K C lines, because I want wider adoption of this tool. Simple code is easier to learn and maintain. I'd like also to avoid any external dependencies for this project. At the end of the article, you can see the actual results I have now. (...) As for the generated code performance, I decided that it should be at least 70% of GCC -O2 performance. The implementation should be simple too at less than 10K C lines, because I want wider adoption of this tool. Simple code is easier to learn and maintain. (...) The biggest cons of the existing projects were their size, the fact that it would be hard for me to achieve my goals using them, and that I can not control the projects. Also, the smaller source size of the MIR project makes studying the code easier for other people and reduces the effort required to maintain it."
I can understand the point for LLVM, but I don't fully understand why QBE (https://c9x.me/compile/doc/llvm.html, which is part of his assessment) didn't fit in what he is looking for.
...and production compilers: https://andykeep.com/pubs/dissertation.pdf Definitely Chez 9 is based on it -- not sure about Chez 8.