You could even consider re-using the Go compiler IR and backend for native, statically linked binaries, instead of generating JVM IR.
You could even consider re-using the Go compiler IR and backend for native, statically linked binaries, instead of generating JVM IR.
Value types help: kc's type is a three-word struct stored inline in each node and compared with ==, while kotlinc's types are object graphs (type, lookup tag, attributes, argument array) built once for FIR and again for IR. I didn't measure how large impact it has overall though.
Yes, the parallelism is explicit, and it's plain Go: a pool of goroutines reading from a channel, used for parsing, checking and codegen. It's safe because all declarations and signatures are resolved first, one file after another.
A Go compiler IR is a very interesting idea, honestly, I haven't thought about that before.