feat(llvm): Phase 131-15 - print/concat segfault 根治修正

## P1-1/P1-2: TypeFacts 優先化
- binop.py: operand facts が dst_type ヒントより優先
- mir_json_emit.rs: Unknown 時に dst_type を出さない
- function_lower.py: value_types を metadata から読み込み

## P2: handle concat 統一(根治)
- print シグネチャ修正: i64(i64) → void(i8*)
- Mixed concat を handle ベースに統一:
  - concat_si/concat_is → concat_hh
  - box.from_i64 で integer を handle 化
  - Everything is Box 哲学に統一
- legacy 関数は互換性のために保持

## 結果
-  print("Result: " + 3) → Result: 3
-  segfault 解消
-  Everything is Box 統一

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-12-15 01:36:34 +09:00
parent 7f57a1bb05
commit a955dd6b18
9 changed files with 234 additions and 88 deletions

View File

@ -121,6 +121,8 @@ NYASH_USE_STAGE1_CLI=1 STAGE1_EMIT_MIR_JSON=1 \
| `NYASH_LLVM_TRACE_PHI=1` | OFF | PHI 配線/スナップショット解決の詳細トレースPython backend |
| `NYASH_LLVM_TRACE_VALUES=1` | OFF | value 解決トレースPython backend |
| `NYASH_LLVM_TRACE_OUT=/tmp/llvm_trace.log` | unset | LLVM トレースの出力先(未指定なら stdout |
| `NYASH_LLVM_STRICT=1` | OFF | Python LLVM backend を Fail-Fast モードにするsnapshot miss / use-before-def / PHI不整合 を即エラー化) |
| `NYASH_LLVM_PHI_STRICT=1` | OFF | PHI の default-zero フォールバックを禁止し、incoming miss を即エラー化 |
### 使用例