Files
hakorune/docs/development/roadmap/phases/phase-11.7_jit_complete
Moe Charm 11506cee3b Phase 11-12: LLVM backend initial, semantics layer, plugin unification
Major changes:
- LLVM backend initial implementation (compiler.rs, llvm mode)
- Semantics layer integration in interpreter (operators.rs)
- Phase 12 plugin architecture revision (3-layer system)
- Builtin box removal preparation
- MIR instruction set documentation (26→Core-15 migration)
- Cross-backend testing infrastructure
- Await/nowait syntax support

New features:
- LLVM AOT compilation support (--backend llvm)
- Semantics layer for interpreter→VM flow
- Tri-backend smoke tests
- Plugin-only registry mode

Bug fixes:
- Interpreter plugin box arithmetic operations
- Branch test returns incorrect values

Documentation:
- Phase 12 README.md updated with new plugin architecture
- Removed obsolete NYIR proposals
- Added LLVM test programs documentation

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-01 23:44:34 +09:00
..

Phase 11.7 JIT Complete (MIR-15 + Semantics + Sync/Async GC)

Scope: Implement a productionready JIT backend for Nyash that fully supports the MIR Core15 instruction set, synchronous/async GC cooperation, and delivers a simple, reproducible developer experience across platforms (WSL/Linux/Windows).

Why now:

  • LLVM AOT は一度実装を進めたが、Windows 依存が重くサイズも大きい。Cranelift に回帰して、純Rustで“Just Works”のDXを取り戻し、高速な反復開発を実現するAOT/LLVMは資料として保持

Outcomes (Definition of Done):

  • All MIR15 ops compile and execute via JIT with behavioral parity to VM.
  • BoxCall/ExternCall are handled through NyRT shims (handlefirst ABI) safely.
  • Sync GC barriers in place (read/write), async safepoints wired at call/loop edges.
  • Smokes: echo/array/map/vinvoke/extern pass; parity checks vs VM/JIT (logs included).
  • 1command setup and run on WSL + Windows Dev PowerShell; no external LLVM needed.

Backends Strategy:

  • LLVM AOT はアーカイブ(参照は可)。主線は CraneliftJIT/軽量AOT
  • JIT 既定は Craneliftfeature: cranelift-jit。AOT は必要に応じ cranelift-object を併用。

This folder contains the living plan (PLAN.md) and the rolling snapshot of the current task focus (CURRENT_TASK.md). Semantics 層の導入により、Nyash スクリプトVMJITexeの動作を一致させる。