You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update roadmap with accurate cross-platform analysis and LSP consolidation plan
Replace vague 'macOS/Windows syscalls' checklist with detailed analysis:
syscalls are 100% manual inline assembly (not LLVM-handled), hardcoded to
Linux x86-64 ABI. Document 5-phase approach from target detection through
Windows NTAPI support. Add LSP consolidation section noting ~1,500 LOC of
duplication across 8 type inference implementations.
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
| Windows | N/A — uses NTAPI | Completely different | No `syscall`| Very high |
67
+
68
+
**Phased approach:**
69
+
70
+
-[ ]**Phase 1: Target detection** — Query LLVM target triple, route to platform-specific codegen in `build_syscall()`
71
+
-[ ]**Phase 2: Linux ARM64** — Easiest win. Same syscall concept, different ABI. Create `syscall_aarch64.zen` with ARM64 numbers, modify `build_syscall()` for `svc #0` + x0-x7 registers
72
+
-[ ]**Phase 3: macOS** — Create `syscall_macos.zen`. Note: Apple discourages raw syscalls (numbers change between versions), long-term should FFI to libSystem
73
+
-[ ]**Phase 4: Windows** — Architectural change. No raw syscalls — needs NTAPI via FFI (`ntdll.dll`/`kernel32.dll`). Essentially a separate I/O backend
74
+
-[ ]**Phase 5: Stdlib abstraction layer** — Platform-independent I/O/threading/memory API in stdlib that dispatches to OS-specific implementations
75
+
76
+
**Files affected:**`src/codegen/llvm/stdlib_codegen/compiler.rs` (build_syscall), `src/intrinsics.rs`, `stdlib/sys/syscall.zen`, and every stdlib file using `compiler.syscall*()` (~15 files across io/, sys/, concurrency/, memory/)
77
+
78
+
### 4. LSP Consolidation
79
+
80
+
The LSP is 16,399 LOC across 55 files — reasonable for a full-featured LSP with
81
+
compiler integration (rust-analyzer is 150K, gopls 50K), but has ~1,500 LOC of
82
+
consolidation opportunities:
83
+
84
+
-[ ]**Consolidate type inference** — 8 separate files duplicate Expression-matching logic (~500 LOC savings)
0 commit comments