Files
hakorune/lang/src
nyash-codex e23b906512 feat(phase-25): Implement BoxCall→Call transformation for MatI64 (MVP)
Phase 25 MVP 実装完了 (242 lines):
-  MatI64 Box ID identification (newbox "MatI64" detection)
-  Copy chain resolution (recursive with depth limit)
-  BoxCall(MatI64, "mul_naive") → Call("NyNumericMatI64.mul_naive")
-  Opt-in with NYASH_AOT_NUMERIC_CORE=1
-  Trace mode with NYASH_AOT_NUMERIC_CORE_TRACE=1

Implementation:
- build_type_table(): Detect MatI64 instances via newbox scan
- build_copy_map(): Build copy instruction mapping
- resolve_copy(): Resolve copy chains recursively (max depth 10)
- transform_boxcalls(): Transform BoxCall → Call for MatI64.mul_naive

Scope (80/20 MVP):
- MatI64.mul_naive only (single pattern)
- Simple newbox detection (no complex phi propagation)
- Text-based JSON v0 transformation
- Fail-safe: unknown patterns pass through unchanged

Next steps:
- Test with matmul_core benchmark
- Verify Call NyNumericMatI64.mul_naive in MIR
- Add MatI64.at transformation (if needed)

🎉 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-14 21:36:13 +09:00
..