suite passes now with mcode->mach lowering
This commit is contained in:
@@ -5,11 +5,11 @@ description: "Overview of the compilation stages and optimizations"
|
||||
|
||||
## Overview
|
||||
|
||||
The compilation pipeline transforms source code through several stages, each adding information or lowering the representation toward execution. There are three execution backends: the Mach register VM (default), the Mcode interpreter (debug), and native code via QBE (experimental).
|
||||
The compilation pipeline transforms source code through several stages, each adding information or lowering the representation toward execution. All backends share the same path through mcode and streamline. There are three execution backends: the Mach register VM (default), the Mcode interpreter (debug), and native code via QBE (experimental).
|
||||
|
||||
```
|
||||
Source → Tokenize → Parse → Fold → Mach VM (default)
|
||||
→ Mcode → Streamline → Mcode Interpreter
|
||||
Source → Tokenize → Parse → Fold → Mcode → Streamline → Mach VM (default)
|
||||
→ Mcode Interpreter
|
||||
→ QBE → Native
|
||||
```
|
||||
|
||||
@@ -72,12 +72,18 @@ Provides operation implementations as QBE IL templates. Each arithmetic, compari
|
||||
|
||||
### Mach VM (default)
|
||||
|
||||
Binary 32-bit register VM. Used for production execution and bootstrapping.
|
||||
Binary 32-bit register VM. The Mach serializer (`mach.c`) converts streamlined mcode JSON into compact 32-bit bytecode with a constant pool. Used for production execution and bootstrapping.
|
||||
|
||||
```
|
||||
./cell script.ce
|
||||
```
|
||||
|
||||
Debug the mach bytecode output:
|
||||
|
||||
```
|
||||
./cell --core . --dump-mach script.ce
|
||||
```
|
||||
|
||||
### Mcode Interpreter
|
||||
|
||||
JSON-based interpreter. Used for debugging the compilation pipeline.
|
||||
|
||||
Reference in New Issue
Block a user