Commit Graph

6 Commits

Author SHA1 Message Date
1b98f85df9 🚀 Phase 10.11: Everything is Plugin革命完了!
主な変更:
- ConsoleBox/MathBoxプラグイン実装・登録完了
- nyash_box.toml 2ファイルシステム設計(中央レジストリ+個別仕様書)
- 全プラグインにnyash_box.tomlテンプレート追加
- プラグイン優先機能(NYASH_USE_PLUGIN_BUILTINS=1)文書化
- ビルトインBox削除準備(ChatGPT5実装中)
- ネイティブビルドデモ追加(Linux/Windows動作確認済み)

Everything is Box → Everything is Plugin への歴史的転換!
開発20日目にしてビルトインBox全削除という革命的決定。

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-30 01:33:52 +09:00
22212aa314 refactor: Major interpreter modularization and P2PBox enhancements
Major Interpreter Refactoring:
- Split core.rs (373 lines removed) into focused modules
- Split expressions/calls.rs (460 lines removed) into cleaner structure
- Added new modules: calls.rs, errors.rs, eval.rs, methods_dispatch.rs, state.rs
- Improved separation of concerns across interpreter components

P2PBox Enhancements:
- Added on_once() for one-time event handlers
- Added off() for handler deregistration
- Implemented handler flags with AtomicBool for thread-safe management
- Added loopback testing cache (last_from, last_intent_name)
- Improved Arc-based state sharing for transport and handlers

Plugin Loader Unification (In Progress):
- Created plugin_loader_unified.rs skeleton
- Created plugin_ffi_common.rs for shared FFI utilities
- Migration plan documented (2400 lines → 1100 lines target)

MIR & VM Improvements:
- Enhanced modularized MIR builder structure
- Added BoxCall dispatch improvements
- Better separation in builder modules

Documentation Updates:
- Added Phase 9.79a unified box dispatch plan
- Created plugin loader migration plan
- Updated CURRENT_TASK.md with latest progress

All tests passing (180 tests) - ready for next phase of refactoring

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-26 19:13:57 +09:00
9eb52982b5 fix: Phase 9.78e+: Fix birth constructor and builtin Box method inheritance
🌟 Major fixes:
- Fix birth constructor lookup (was searching for 'init/N', now 'birth/N')
- Fix builtin Box method inheritance via __builtin_content field
- Remove InstanceBox wrapping for builtin Boxes
- Update execute_builtin_birth_method to properly store builtin content
- Update method resolution to check __builtin_content for builtin methods

 All tests pass:
- Birth constructors work correctly
- User-to-user Box delegation works
- User-to-builtin Box delegation works (toString() properly inherited)
- Apps folder tested (chip8, kilo editor run successfully)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-20 02:19:59 +09:00
fa1a3ad644 feat(Phase 9.75j): Complete warning elimination - 106→0 warnings (100% improvement)
 Major code quality improvements:
• Fixed all unused variable and parameter warnings
• Added appropriate #[allow(dead_code)] annotations
• Renamed constants to follow Rust naming conventions
• Achieved completely warning-free codebase

🔧 Key changes:
• Parser expressions: Fixed arg_count and statement_count usage
• MIR modules: Added dead_code allows for future-use code
• Backend modules: Prefixed unused parameters with underscore
• Effect constants: Renamed 'read' to 'READ_ALIAS' for conventions

📊 Results:
• Before: 106 warnings (noisy build output)
• After: 0 warnings (clean build)
• Improvement: 100% warning reduction

🎯 This continues the bug fixing initiative "つづきのしゅうせいおねがいにゃ!"
from Phase 9.75i (birth() fixes, static methods, Copilot apps).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-16 17:39:04 +09:00
ef14f44825 refactor(interpreter): Step 5 - Extract builtins module
- Move execute_builtin_box_method() to expressions/builtins.rs (88 lines)
- Move execute_builtin_birth_method() to expressions/builtins.rs (74 lines)
- Complete expressions module refactoring (5/5 steps)
- Remove orphaned doc comment that prevented compilation
- Total extracted: ~380 lines from mod.rs to 4 specialized modules
- Improved maintainability with single responsibility principle
2025-08-16 13:11:53 +09:00
b0ed2920fd refactor(interpreter): Step 1 - Setup expressions module structure
- Move expressions.rs to expressions/mod.rs
- Create empty module files: operators.rs, calls.rs, access.rs, builtins.rs
- Add module declarations to mod.rs
- Build passes successfully

Next: Step 2 - Extract operator functions
2025-08-16 12:41:19 +09:00