The official Kotlin/Native documentation states that Kotlin/Native
..是Kotlin编译器基于LLVM的后端.
据我所知:
- Kotlin编译器(kotlinc)生成.从Kotlin源文件中初始化文件(使用Java字节码).
- 通用LLVM后端(与Kotlin无关)采用LLVM IR并将其转换为二进制代码.
Therefore, is Kotlin/Native converting Java bytecode into LLVM IR? If so, is it correct to state that Kotlin/Native is a LLVM backend? Does Kotlin code get compiled into LLVM IR? If not, what is the input and output of each compilation step? (e.g.: Kotlin -(kotlinc)-> Java bytecode -(LLVM backend-> native binary)
This篇博文指出,Kotlin前端编译器(我想它指的是kotlinc)生成了Kotlin IR,我从未读过它.
Kotlin编译器有一个前端,但有多个后端,这取决于您用来构建代码的插件.Kotlin/Native插件将Kotlin中间表示(IR)转换为本地代码(即机器可执行的代码).
Is this quote correct?
它告诉您,Java字节码、本机代码和JavaScript的编译过程是相同的.编译Kotlin代码,然后有3个后端编译器提供预期的输出格式(Java字节码、JavaScript、二进制代码).
最终的特定于平台的二进制文件是包含本地Kotlin标准库还是动态链接?