Commit Graph

3 Commits

Author SHA1 Message Date
6856922374 Phase 25.1a: selfhost builder hotfix (fn rename, docs) 2025-11-15 05:42:32 +09:00
864a94d013 feat(phase-21.8+25): Complete imports resolution + Ring0/Ring1 numeric ABI design
Phase 21.8 完了 (imports resolution):
-  using nyash.core.numeric.matrix_i64 as MatI64 完全対応
-  hakorune_emit_mir.sh で imports 抽出・MirBuilder に配線
-  MatI64/IntArrayCore の静的参照解決が安定動作
-  matmul_core ベンチ MIR 生成成功 (VM/LLVM 両対応)

Phase 25 設計完了 (Ring0/Ring1 + numeric ABI):
- 🎯 Ring0/Ring1 責務分離を明文化 (Rust Freeze Policy 具体化)
- 🎯 Call/ExternCall 明確な分離設計
  - Call: Ring1 Hako 関数 (numeric core 等)
  - ExternCall: Ring0 intrinsic (rt_mem_* 等の FFI のみ)
- 🎯 BoxCall → Call 変換方針確定 (AotPrep で実施)
- 🎯 MatI64.mul_naive を NyNumericMatI64.mul_naive に分離
  (System Hakorune subset で完全実装済み)

実装:
-  AotPrepNumericCoreBox 診断パス実装 (NYASH_AOT_NUMERIC_CORE=1)
-  numeric ABI ドキュメント整備 (NUMERIC_ABI.md)
-  System Hakorune subset 定義 (system-hakorune-subset.md)
-  IntArrayCore/MatI64 仕様固定 (lang/src/runtime/numeric/README.md)
-  ENV_VARS.md に NYASH_AOT_NUMERIC_CORE トグル追記

今後のタスク:
- BoxCall(MatI64) → Call(NyNumericMatI64) 変換実装 (opt-in)
- IntArrayCore の numeric core 整備
- matmul_core スモークテスト (NYASH_AOT_NUMERIC_CORE=0/1 両対応)

🎉 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 20:19:00 +09:00
29dae149ea feat(phase-21.8): wire imports through extern_provider (Step 7 part 1)
**Step 7 進行中**: extern_provider 側の実装完了

Changes:
- Modified extern_provider.rs to read HAKO_MIRBUILDER_IMPORTS env var
- Both routes now call program_json_to_mir_json_with_imports():
  - Direct extern call (env.mirbuilder.emit)
  - hostbridge.extern_invoke route
- Deserializes JSON imports map and passes to MirBuilder
- Build succeeds 

Next: Wire collection side - set HAKO_MIRBUILDER_IMPORTS from runner

Related: #phase-21.8 MatI64/IntArrayCore integration
2025-11-14 16:34:41 +09:00