Commit Graph

3 Commits

Author SHA1 Message Date
b4f6818f3b refactor: 大型プラグインのモジュール分割によるコード品質向上
nyash-json-plugin:
- 796行の単一ファイルから6モジュール構造へ分割
- constants.rs, provider.rs, doc_box.rs, node_box.rs, tlv_helpers.rs, ffi.rsに責任分離
- 最大ファイルサイズを374行に削減(53%削減)
- 共有状態管理をprovider.rsに集約

nyash-net-plugin:
- 1112行の巨大ファイルから17ファイル構造へ分割
- boxesサブディレクトリでBox実装を整理(server, client, request, response, socket系)
- 最大ファイルサイズを290行に削減(74%削減)
- logging, tlv, http_helpers等の共通機能を独立モジュール化

両プラグインともビルド成功確認済み、完全な後方互換性を維持

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 01:57:12 +09:00
824ca600ea refactor: 大規模ファイル分割とプラグインリファクタリング
## 🎯 プラグイン整理
-  **nyash-json-plugin**: プロバイダー抽象化、NodeRep統一
-  **nyash-string-plugin**: TLVヘルパー整理
-  **nyash-net-plugin**: HTTPヘルパー分離、ソケット管理改善
-  **nyash-counter-plugin/fixture-plugin**: 基本構造整理

## 📂 mir_interpreter分割
-  **mir_interpreter.rs → mir_interpreter/ディレクトリ**
  - mod.rs: メイン構造体定義
  - execution.rs: 実行エンジン
  - memory.rs: メモリ管理
  - instructions/: 命令別実装

## 🔧 その他の改善
- テストファイル群の最適化
- LLVMコンパイラのメイン関数整理
- 不要なインポート削除

1000行超のファイルを適切なモジュール構造に分割完了!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-25 01:09:48 +09:00
27568eb4a6 json: add v2 JsonDoc/JsonNode plugin with runtime provider switch; vendored yyjson + FFI; loader resolve(name)->method_id; PyVM JSON shims; smokes + CI gate; disable MiniVmPrints fallbacks by default
- plugin_loader_v2: store per-Box resolve() from TypeBox FFI; add resolve_method_id() and use in invoke_instance_method
- plugin_loader_unified: resolve_method() falls back to loader’s resolve when TOML lacks method entries
- nyash.toml: register JsonDocBox/JsonNodeBox methods (birth/parse/root/error; kind/get/size/at/str/int/bool)
- plugins/nyash-json-plugin:
  * serde/yyjson provider switch via env NYASH_JSON_PROVIDER (default serde)
  * vendored yyjson (c/yyjson) + shim; parse/root/get/size/at/str/int/bool implemented for yyjson
  * TLV void returns aligned to tag=9
- PyVM: add minimal JsonDocBox/JsonNodeBox shims in ops_box.py (for dev path)
- tests/smokes: add jsonbox_{parse_ok,parse_err,nested,collect_prints}; wire two into min-gate CI
- tools: collect_prints_mixed now uses JSON-based app
- MiniVmPrints: move BinaryOp and fallback heuristics behind a dev toggle (default OFF)
- CURRENT_TASK.md: updated with provider policy and fallback stance
2025-09-22 06:16:20 +09:00