3 ms·
>now get to focus on building the frontend of the compiler Although LLVM is cool, it's just a backend, so besides frontend you need some runtime, type checker,
by ernst_klim 7y ago
>now get to focus on building the frontend of the compiler
Although LLVM is cool, it's just a backend, so besides frontend you need some runtime, type checker, type inference, and, if your lang is sufficiently complex, you still need a huge middle end layer which knows something about semantics of your language and how to optimize it properly.
So if your language is just a very simple featureless language with procedures and simple data types, like Pascal, you could just write a direct code generator. But when you have a language with GC, exceptions, modules and all that kind of stuff, you need a middle end, and a complex one.