中间表示(IR):在编译器、解释器或代码分析工具中,位于“源代码”和“目标机器代码”之间的一种内部代码形式,用来便于优化、分析、跨平台生成代码。常见于编译器后端与优化阶段。(也可泛指任何“中间层的表示形式”。)
An intermediate representation helps the compiler optimize the program.
中间表示能帮助编译器对程序进行优化。
The team translated the source code into an intermediate representation, ran several optimization passes, and then emitted machine code for different targets.
团队先把源代码转换成中间表示,执行多轮优化流程,然后为不同目标平台生成机器码。
/ˌɪntərˈmiːdiət ˌrɛprɪzɛnˈteɪʃən/
intermediate 来自拉丁语 intermedius,意为“在中间的”;representation 源自拉丁语 repraesentare,有“呈现、表达”的含义。合起来就是“用于表达某物的中间形式”,在计算机领域特指编译过程中用于承上启下的内部代码/结构。