Step by step instructions to making the language.
-
return 0;- Basic Tokenizing
- Basic AST generation
- Basic Code Generation and execution
- x86 Code Generation
- AST Iteration
- Statement -> Assembly
- Custom Assembler library
- Assemble Basic instructions like
push rax - Prefixes
- Hints
- Vector EXtension Instructions
- EVEX
-
return 1 + 1;- Expression Parsing
- Order of Operations
- Unary Operators
- Comma
- x86 Code Generation
- Expression iteration and emitting appropriate instructions
- Expression Parsing
-
let hi = 1;- Parse Variable Declaration
- x86 Code Generation
- Stack allocation
- Assignment
- Automatic Return
-
let hi = 1; return hi;- Sequential statements
- x86 Code Generation
- Basic Register Allocation
-
print(1);- Function Calls
- Arguments
- Linking to the C library / externally defined functions.
- x86 Code Generation
- Function Call
- Calling Conventions
- Windows
__cdecl- Register usage
- Return values
- Working with register allocation
- Windows
- Function Calls
-
print("hi");- Strings
- String Pooling
- Function Calls
- Arguments
- Return Values
- Linking to the C library / externally defined functions.
- Strings
-
fn main() { return 0; } return main();- Function Calls
- Linking to the C library / externally defined functions.