9be50f0a0c
refactor(vm): Phase 4 - Void Guard統一化(重複削減)
...
boxes_void_guards.rs新規作成で28行の重複を排除
実装内容:
- handle_void_method()ヘルパー関数作成
- 7種類のメソッド(is_eof/length/substring/push/get_position/get_line/get_column)統一
- boxes.rs: 30行→18行(12行削減)
- 重複ブロック2箇所→シングルソース化
効果:
- 保守性向上: 単一の真実の源(Single Source of Truth)
- 可読性向上: 大きなmatchブロック→簡潔なヘルパー呼び出し
- バグ修正容易化: 1箇所修正で全体に反映
テスト: Void.is_eof(), Void.length()正常動作確認
2025-11-01 13:41:43 +09:00
367066376a
refactor(handlers): extract boxes_plugin module (Phase 2-3) - Phase 2 complete!
...
Split handlers/boxes.rs (497→322 lines, -175 lines, -35.2%)
Changes:
- Created boxes_plugin.rs (175 lines)
- Extracted invoke_plugin_box function
- Handles PluginBoxV2 method dispatch
- Includes fallback handlers for InstanceBox methods
- Special handling for ConsoleBox.readLine, VoidBox methods
- Updated mod.rs to declare new module
- Updated boxes.rs to redirect to new module
- Build verified: 0 errors, 85 warnings
Phase 2 Complete Summary:
- boxes.rs: 1008→322 lines (-686 lines, -68.1% reduction!)
- Split into 3 focused modules:
- boxes_object_fields.rs (359 lines) - getField/setField
- boxes_instance.rs (150 lines) - InstanceBox dispatch
- boxes_plugin.rs (175 lines) - Plugin dispatch
Overall Progress:
- Phase 1: Legacy deletion (2,997 lines)
- Phase 2-1: boxes_object_fields split (360 lines)
- Phase 2-2: boxes_instance split (151 lines)
- Phase 2-3: boxes_plugin split (175 lines)
- Total reduction: 3,683 lines deleted
Next: Phase 3 (builder_calls.rs split, ~142 lines)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-01 12:42:52 +09:00
232547baa3
refactor(handlers): extract boxes_instance module (Phase 2-2)
...
Split handlers/boxes.rs (648→497 lines, -151 lines, -23.3%)
Changes:
- Created boxes_instance.rs (150 lines)
- Extracted try_handle_instance_box function
- Handles InstanceBox method dispatch
- Supports Class.method/arity and ClassInstance.method/arity
- Updated mod.rs to declare new module
- Updated boxes.rs to redirect to new module
- Build verified: 0 errors, 85 warnings
Progress:
- Phase 1: Legacy deletion (2,997 lines)
- Phase 2-1: boxes_object_fields split (360 lines)
- Phase 2-2: boxes_instance split (151 lines)
- Total reduction so far: 3,508 lines
Next: Phase 2-3 (boxes_plugin.rs, ~176 lines)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-01 12:38:48 +09:00
c8856e1a08
refactor(handlers): extract boxes_object_fields module (Phase 2-1)
...
Split handlers/boxes.rs (1008→648 lines, -360 lines, -35.7%)
Changes:
- Created boxes_object_fields.rs (359 lines)
- Extracted try_handle_object_fields function
- Handles getField/setField for InstanceBox
- Updated mod.rs to declare new module
- Updated boxes.rs to redirect to new module
- Build verified: 0 errors, 85 warnings
Progress:
- Phase 1: Legacy deletion (2,997 lines)
- Phase 2-1: boxes_object_fields split (360 lines)
- Total reduction so far: 3,357 lines
Next: Phase 2-2 (boxes_instance.rs), Phase 2-3 (boxes_plugin.rs)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-01 12:32:38 +09:00
cdf826cbe7
public: publish selfhost snapshot to public repo (SSOT using + AST merge + JSON VM fixes)
...
- SSOT using profiles (aliases/packages via nyash.toml), AST prelude merge
- Parser/member guards; Builder pin/PHI and instance→function rewrite (dev on)
- VM refactors (handlers split) and JSON roundtrip/nested stabilization
- CURRENT_TASK.md updated with scope and acceptance criteria
Notes: dev-only guards remain togglable via env; no default behavior changes for prod.
2025-09-26 14:34:42 +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