Skip to content

Commit 99131a2

Browse files
committed
docs: Update LLVM backend status and add comptime parameter support
- Mark LLVM AOT backend as core complete (functions, structs, generics) - Add recent progress for LLVM backend (parameter mapping, InsertValue, ExtractValue) - Document comptime parameter support in Zig grammar - Update roadmap to reflect LLVM backend completion - Update multi-backend description to show LLVM is fully working
1 parent f895873 commit 99131a2

2 files changed

Lines changed: 27 additions & 8 deletions

File tree

BACKLOG.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
# Zyntax Compiler - Development Backlog
22

3-
**Last Updated**: November 23, 2025
3+
**Last Updated**: November 27, 2025
44
**Current Status**: Production-Ready Core (100% tests passing, 71/71 Zig tests)
55

66
**Recent Progress**:
77

8+
-**LLVM Backend Working** (AOT and JIT modes fully functional - functions, structs, generics)
9+
- Parameter value mapping for function calls
10+
- Struct initialization with InsertValue
11+
- Generic function instantiation with comptime
12+
-**Comptime Parameter Support** (Zig grammar: `fn foo(comptime T: type, x: T) T`)
813
-**ZynPEG VM Runtime** (No Rust compilation required! JSON command pattern for dynamic AST construction)
914
- `pest_vm` for dynamic grammar parsing
1015
- JSON action blocks in `.zyn` files → runtime interpretation
@@ -199,14 +204,26 @@ No Rust compilation required for grammar users! Dynamic interpretation of JSON a
199204

200205
## Compiler Infrastructure
201206

202-
### 2. LLVM AOT Backend (MEDIUM PRIORITY)
203-
**Status**: Framework exists, needs completion
207+
### 2. LLVM AOT Backend (MEDIUM PRIORITY) ✅ CORE COMPLETE
208+
209+
**Status**: Working for core features (functions, structs, generics)
204210
**Location**: `crates/compiler/src/llvm_backend.rs`
205211

212+
**Completed (November 27, 2025)**:
213+
214+
- [x] Function calls with parameters (SSA parameter value mapping)
215+
- [x] Struct initialization (InsertValue instruction)
216+
- [x] Struct field access (ExtractValue instruction)
217+
- [x] Generic function instantiation with comptime
218+
- [x] Both AOT and JIT modes working
219+
- [x] Basic control flow (if/while)
220+
- [x] Arithmetic operations
221+
206222
**Remaining Work**:
207-
- [ ] Complete instruction translation
223+
224+
- [ ] Advanced control flow (switch, pattern matching)
225+
- [ ] Error union types (try/catch)
208226
- [ ] Implement optimization passes
209-
- [ ] Generate executable binaries
210227
- [ ] Cross-platform testing
211228

212229
### 3. Bytecode Interpreter (LOW PRIORITY)

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
- **Production-Ready stdlib**: Vec, String, HashMap, Iterator (93/100 functions compile)
2626

27-
- **Multi-Backend**: Cranelift JIT (fast) + LLVM AOT (optimized)
27+
- **Multi-Backend**: Cranelift JIT (fast) + LLVM AOT/JIT (optimized, fully working)
2828

2929
- **HIR Builder API**: Type-safe, fluent interface for IR construction
3030

@@ -472,9 +472,10 @@ cargo build --release
472472
#### ✅ Tiered JIT Compilation
473473
- **Tier 1**: Cranelift baseline JIT (fast compilation)
474474
- **Tier 2**: Cranelift optimized (moderate optimizations)
475-
- **Tier 3**: LLVM JIT (aggressive optimizations for hot paths)
475+
- **Tier 3**: LLVM JIT (aggressive optimizations for hot paths) - **fully working**
476476
- Runtime profiling with atomic execution counters
477477
- Hot-path detection and automatic recompilation
478+
- LLVM AOT backend for native executables (functions, structs, generics)
478479

479480
#### ✅ Standard Library
480481
- `Vec<T>` - Dynamic array with push/pop/indexing
@@ -551,7 +552,8 @@ See [BACKLOG.md](BACKLOG.md) for detailed tasks.
551552

552553
### Q1 2026: Production Features
553554

554-
- 🔄 LLVM AOT backend completion
555+
- ✅ LLVM AOT/JIT backend core complete (functions, structs, generics, control flow)
556+
- 🔄 LLVM backend: advanced features (switch, pattern matching, error unions)
555557
- 🔄 Haxe-style exception handling (throw/catch/finally with stack unwinding)
556558
- 🔄 Complete I/O and networking standard library
557559
- 🔄 String operations (needs stdlib integration via plugin system)

0 commit comments

Comments
 (0)