第 1 步,共 12 步8%

What Is a Compiler?

编译器将用高级语言编写的源代码翻译为较低级别的语言(汇编、字节码或机器码)。它读取整个程序,进行分析,然后产生输出。

Compiler — translates entire program before execution
Interpreter — executes program line by line

Examples:

  • Compilers: GCC (C/C++), rustc, javac
  • Interpreters: Python, Ruby, Bash
  • Hybrid: Java (compile to bytecode, JVM interprets/JITs)

提示

检验你的理解

What does a compiler do?