C Compiler
Roadmap
Phase 1: Basics
Constructs:
- program
- function definition
- statement
- return statement
- expression
- constant
- unary operators, unary expression
- binary operators, binary expression
- bitwise operators
- logical operators
- relational operators
- local variable
- variable declaration
- assignment operator and variable assignment expression
- expression statement
- null statement
- compound assignment
- increment and decrement
- if statement
- labeled statements and goto
- conditional expression
- compound statement
-
loops
- for loop statement
- while loop statement
- do while loop statement
- break statement
- continue statement
-
switch statement
- case statement
- default statement
- function declaration
- function call
-
scopes
- file scope
- block scope
- file scope variable declaration
-
storage duration specifiers, storage durations
- automatic storage duration
- static storage duration
-
linkages
- no linkage
- external linkage
- internal linkage
Semantic Analysis:
-
identifier resolution
- variable resolution
- function resolution
- identifier table
- transformed AST
- loop labeling
- annotated AST
-
type checking
- symbol table
Code Generation:
- AST, MIR, LIR
- AT&T x64 ASM
- stack allocation
- temporary variable
- System V x86-64 ABI
Debugging:
- tokens for debugging
- split CST and AST
- AST for debugging
- colored terminal output
Tests:
- integration tests
Phase 2: Types
- long integer
- cast operations
- unsigned integer
-
floating-point number
- SSE
- vector
- swizzling
- NaN
- pointer
- array
- pointer arithmetic
- character
- string
-
dynamic memory allocation
- the operator sizeof
- the type void
- struct
- union
Plus:
- function pointer
Metalanguage
- macro
Phase 3: Optimization
- IR optimization
- register allocation