WTSC 0: Plan for Walk Through the Swift Compiler

149 阅读1分钟

Purpose:

It is for a beginner who somehow know about programming and compiler to know how the Swift compiler works. In other words, how the compiler compiles source files to an executable for a specific platform.

How to do:

The organization of this series of posts will be based on Top-Down approch, from big picture as a guide map to concrete details implemented into source code.

Therefore the menu of these posts would be as following:

1. Overview of the Swift Compiler.

2. Setup our playground

3. Driver

4. Lexer

5. Parser

6. Semantic Analysis

7. SIL Generation

8. SIL Guaranteed transformations

9. SIL Optimizations

10. LLVM IR Generation

11. IR Optimization

12. Backend