## 🎉 完了項目 - ✅ plugin_box_legacy.rs削除(7.7KB、参照ゼロ確認済み) - ✅ REMOVEDコメント整理(encode.rs簡潔化) - ✅ venv削除(143MB節約、.gitignoreは既存) - ✅ llvm_legacyスタブ化(8KB、compile_error!による安全化) ## 🏆 成果 - **リポジトリサイズ改善**: 151MB削減 - **コード整理**: レガシーコード安全にアーカイブ - **プラグインファースト**: StrictPluginFirst継続動作 ## ✅ 検証完了 - cargo build --release --features llvm (警告のみ、エラーなし) - LLVMハーネス実行: print出力正常 - プラグイン動作: StringBox等正常動作 codex先生の戦略に従った安全な段階的削除を実行 Co-Authored-By: codex <noreply@anthropic.com>
1.5 KiB
1.5 KiB
PHI-off Troubleshooting
Scope: MIR PHI-off (edge-copy) policy with LLVM harness PHI synthesis.
Phase‑15 では PHI-on が既定だよ。このガイドは
NYASH_MIR_NO_PHI=1を明示してレガシー edge-copy モードを再現しているときだけ参照してね。
Symptoms and Hints
-
Merge block contains self-copy to merged value
- Symptom: Verifier (edge-copy strict) complains or trace shows unexpected write at merge.
- Check: Enable
NYASH_VERIFY_EDGE_COPY_STRICT=1and locate offending merge block. - Fix: Ensure copies are inserted in predecessors only; merge binds the already-defined dst.
-
Missing predecessor copy into merged destination
- Symptom: Edge-copy strict reports missing pred; phi-trace checker shows
missing=[...]. - Check:
tools/phi_trace_check.py --file <trace.jsonl> --summary(or drop--summaryto see diffs on error). - Fix: Builder/Bridge must insert
Copy{dst=merged}at that predecessor end.
- Symptom: Edge-copy strict reports missing pred; phi-trace checker shows
-
Synthesized zero in PHI wiring
- Symptom: phi-trace shows
zero=1or checker with--strict-zerofails. - Check: Ensure the source value exists at predecessor end (resolve_i64/snapshot); add casts/boxing at pred end.
- Fix: Route casts at pred end (not at merge); for strings/handles, ensure i64 handle flows across blocks.
- Symptom: phi-trace shows
Tools
- JSON trace: set
NYASH_LLVM_TRACE_PHI=1andNYASH_LLVM_TRACE_OUT=<path> - One-shot:
tools/phi_trace_run.sh <app.nyash> [--strict-zero] - Strict verifier (PHI-off):
NYASH_VERIFY_EDGE_COPY_STRICT=1 cargo test --lib