Kotlin/Native: between LLVM and VM
Elena Lepilkina,
JetBrains
Nowadays there is a great variety of compilers (both static and dynamic) implemented using different technologies. It is no longer surprising that there are both JIT and AOT compilers for the same language. Now LLVM is often used to create the last ones. LLVM — an excellent open-source solution that makes developing a compiler easier and has many different processor architectures support. However LLVM having a lot of advantages is certainly not a technology that is able to solve all the problems that appear during creating a compiler for any program language. This is especially true for high-level programming languages with automatic memory management like Kotlin.
In this talk we will see how a static compiler for the language that was originally developed as one of the JVM languages is implemented, how code generation using LLVM is made, and why Kotlin/Native still needs to have its own GC, RTTI and C and Objective- C interoperability mechanisms.