f3be8ea5f6
builder/exprs: use AssignStmt and ReturnStmt wrappers for clearer destructuring (no behavior change)
2025-09-17 07:57:29 +09:00
adbb0201a9
chore(fmt): add legacy stubs and strip trailing whitespace to unblock cargo fmt
2025-09-17 07:43:07 +09:00
6ca56b0652
feat: 配列/Mapリテラル糖衣構文の実装とネームスペース解決の改善計画
...
- ArrayLiteral/MapLiteralのAST定義追加
- パーサーで[...]と{...}構文をサポート
- MIR Builderでnew Box() + push/setへのdesugaring実装
- テストケースとスモークスクリプト追加
- CURRENT_TASK.mdにネームスペース解決Phase-1計画を追記
- 3段階解決順序(ローカル→エイリアス→プラグイン)の設計合意
2025-09-16 06:13:44 +09:00
40db299bab
refactor: Gemini/ChatGPT collaborative refactoring + build fixes
...
Major changes:
- Split runner module: 1358→580 lines (via Gemini)
- Create new modules: dispatch.rs, selfhost.rs, pipeline.rs, pipe_io.rs
- Fix build errors from incomplete method migrations
- Add warning to CLAUDE.md about JIT/Cranelift not working
- Create interpreter.rs mode module
- Refactor loop builder into separate module
Build status:
- ✅ Executable builds successfully
- ✅ Basic execution works (tested with print)
- ⚠️ 106 warnings remain (to be cleaned up next)
- ⚠️ execute_mir_mode still in mod.rs (needs further migration)
Note: ChatGPT correctly fixed runner.execute_mir_mode() calls
that I incorrectly changed to super::modes::mir::
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-16 03:54:44 +09:00
94d95dfbcd
🚀 Break/Continue/Try-Catch構文のサポート追加とMIRループ制御強化
...
## 主な変更点
### 🎯 MIRループ制御の実装(根治対応)
- src/mir/loop_builder.rs: Break/Continue対応のループコンテキスト管理
- ループのbreak/continueターゲットブロック追跡
- ネストループの適切な処理
- src/mir/builder.rs: Break/Continue文のMIR生成実装
- src/tokenizer.rs: Break/Continue/Tryトークン認識追加
### 📝 セルフホストパーサーの拡張
- apps/selfhost-compiler/boxes/parser_box.nyash:
- Stage-3: break/continue構文受理(no-op実装)
- Stage-3: try-catch-finally構文受理(構文解析のみ)
- エラー処理構文の将来対応準備
### 📚 ドキュメント更新
- 論文K(爆速事件簿): 45事例に更新(4件追加)
- PyVM迂回路の混乱事件
- Break/Continue無限ループ事件
- EXE-first戦略の再発見
- 論文I(開発秘話): Day 38の重要決定追加
### 🧪 テストケース追加
- apps/tests/: ループ制御とPHIのテストケース
- nested_loop_inner_break_isolated.nyash
- nested_loop_inner_continue_isolated.nyash
- loop_phi_one_sided.nyash
- shortcircuit関連テスト
## 技術的詳細
- Break/ContinueをMIRレベルで適切に処理
- 無限ループ問題(CPU 99.9%暴走)の根本解決
- 将来の例外処理機能への準備
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-15 22:14:42 +09:00
fb2d8e37d5
🎉 Phase 11.8/12.7: MIR Core-13 完全実装 + 糖衣構文ドキュメント更新
...
主要な変更:
- MIR Core-13命令セット確定(Load/Store削除の革命的設計)
- Const, BinOp, Compare(値・計算)
- Jump, Branch, Return, Phi(制御)
- Call, BoxCall, ExternCall(呼び出し)
- TypeOp, Safepoint, Barrier(メタ)
- Phase 12.7糖衣構文ドキュメント整理(超圧縮重視、可逆変換保証)
- MIRビルダーのモジュール分割完了
- vtableテストスイート拡充
- AI協調開発ツール追加(並列リファクタリング支援)
詳細:
- src/mir/instruction_introspection.rs: core13_instruction_names()追加
- MIRビルダー分割: decls.rs, exprs_*.rs, fields.rs
- plugin_loader_v2: errors.rs, host_bridge.rs分離
- 論文用データ: mir13-final.md作成
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-04 11:34:15 +09:00
4e824fa00e
Phase 12.7文法改革: ドキュメント文法統一 + VMリファクタリング準備
...
🌟 Phase 12.7文法改革に基づくドキュメント更新
- init {} → field: TypeBox 個別フィールド宣言形式
- init() → birth() コンストラクタ統一
- pack() → 廃止(birth()に統一)
- public {}/private {} → 個別フィールド修飾子
- override → 廃止(メソッド定義はシンプルに)
📚 更新したドキュメント
- CLAUDE.md: メイン開発ガイド
- docs/quick-reference/syntax-cheatsheet.md: 構文早見表
- docs/reference/language/LANGUAGE_REFERENCE_2025.md: 言語リファレンス
- docs/development/roadmap/phases/phase-15/README.md: Phase 15計画
🔧 VMリファクタリング準備
- vm_methods.rs: VMメソッド呼び出しの分離
- plugin_loader.rs → plugin_loader/: ディレクトリ構造化
- mir/builder/exprs.rs: 式ビルダー分離
📝 新規ドキュメント追加
- 論文戦略・ロードマップ
- Phase 15セルフホスティング準備資料
- Codex Androidセットアップガイド
ビルドは正常に通ることを確認済み!🎉
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-04 06:27:39 +09:00