## 🎉 ChatGPT×Claude協働成果 - ✅ **GC機能復活**: vm-legacy削除で失われたGC機能を新実装で復活 - GCメトリクス追跡システム実装(alloc/collect/pause計測) - 3種類のGCモード対応(counting/mark_sweep/generational) - host_handles.rsでハンドル管理復活 - ✅ **VM整理とエイリアス追加**: 混乱していた名前を整理 - MirInterpreter = NyashVm = VM のエイリアス統一 - vm-legacyとインタープリターの違いを明確化 - 壊れていたvm.rsの互換性修復 - ✅ **スモークテスト整理**: v2構造でプラグイン/コア分離 - plugins/ディレクトリにプラグインテスト移動 - gc_metrics.sh, gc_mode_off.sh, async_await.sh追加 - _ensure_fixture.shでプラグイン事前ビルド確認 ## 📊 json_native調査結果 - **現状**: 25%完成(配列/オブジェクトパース未実装) - **将来性**: 並行処理でyyjson超えの可能性大 - 100KB以上のJSONで2-10倍速の可能性 - Nyash ABI実装後はゼロコピー最適化 - **判断**: 現時点では置換不可、将来の大きな足場 ## 🔍 技術的発見 - vm-legacy = 完全なVM実装(GC付き)だった - MirInterpreter = 現在のRust VM(712行、Arc使用) - 200行簡易JSONは既に削除済み(存在しない) ChatGPT爆速修復×Claude詳細調査の完璧な協働! 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1.2 KiB
1.2 KiB
Structured Exceptions via Result‑Mode (Draft)
Problem
- Language exceptions are hard to implement portably (unwinding, landing pads) and complicate SSA/CFG.
Contribution (Nyash)
- Express try/catch/cleanup with Result‑mode lowering (no MIR Throw/Catch): structured blocks and jumps.
- Thread‑local ThrowCtx to aggregate nested
throwto a single catch. - PHI‑Off: merge variables via edge‑copy; harness synthesizes PHIs.
- Block‑Postfix Catch syntax:
{ body } catch (e) { … } [cleanup { … }]with single‑catch policy.
Method
- Parser (gated): accept try/throw + postfix catch, normalize to
ASTNode::TryCatch. - Bridge: set ThrowCtx on try entry; route
throwto catch BB; bind catch param via incoming. - Cleanup: always runs; merge at exit with PHI‑off rules.
Code References
- Parser:
src/parser/statements.rs - Bridge lowering:
src/runner/json_v0_bridge/lowering/{try_catch.rs, throw_ctx.rs} - Smokes (v2): covered by
tools/smokes/v2integration runs
Evaluation Plan
- Semantic parity: PyVM vs. harness binaries on representative cases.
- Control‑flow complexity: nested if/loop + cleanup; ensure merges are stable.
Reproduce (v2)
tools/smokes/v2/run.sh --profile integration