84ded8ca6c
docs: add loop canonicalizer SSOT + MirBuilder entrypoint
2025-12-16 04:37:47 +09:00
4b87b6cc88
docs: ドキュメント配置ルール(SSOT)確立
...
## 追加内容
- CLAUDE.md にドキュメント配置ルール(SSOT)セクション追加
- DOCS_LAYOUT.md (SSOT): 置き場所ルール定義
- phases/README.md: Phase ドキュメント説明
- design/README.md: 設計図ドキュメント説明
- investigations/README.md: 調査ログ説明
## ルール概要
1. **Phase 文書** → phases/phase-<N>/
2. **設計図** → design/
3. **調査ログ** → investigations/ (結論を 10-Now/20-Decisions に反映)
## 導線
- CLAUDE.md で概要説明
- DOCS_LAYOUT.md で詳細定義(SSOT)
- 各フォルダ README で参照方法
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2025-12-14 18:27:24 +09:00
d7805e5974
feat(joinir): Phase 213-2 Step 2-2 & 2-3 Data structure extensions
...
Extended PatternPipelineContext and CarrierUpdateInfo for Pattern 3 AST-based generalization.
Changes:
1. PatternPipelineContext:
- Added loop_condition: Option<ASTNode>
- Added loop_body: Option<Vec<ASTNode>>
- Added loop_update_summary: Option<LoopUpdateSummary>
- Updated build_pattern_context() for Pattern 3
2. CarrierUpdateInfo:
- Added then_expr: Option<ASTNode>
- Added else_expr: Option<ASTNode>
- Updated analyze_loop_updates() with None defaults
Status: Phase 213-2 Steps 2-2 & 2-3 complete
Next: Create Pattern3IfAnalyzer to extract if statement and populate update summary
2025-12-10 00:01:53 +09:00
4e32a803a7
feat(joinir): Phase 33-22 CommonPatternInitializer & JoinIRConversionPipeline integration
...
Unifies initialization and conversion logic across all 4 loop patterns,
eliminating code duplication and establishing single source of truth.
## Changes
### Infrastructure (New)
- CommonPatternInitializer (117 lines): Unified loop var extraction + CarrierInfo building
- JoinIRConversionPipeline (127 lines): Unified JoinIR→MIR→Merge flow
### Pattern Refactoring
- Pattern 1: Uses CommonPatternInitializer + JoinIRConversionPipeline (-25 lines)
- Pattern 2: Uses CommonPatternInitializer + JoinIRConversionPipeline (-25 lines)
- Pattern 3: Uses CommonPatternInitializer + JoinIRConversionPipeline (-25 lines)
- Pattern 4: Uses CommonPatternInitializer + JoinIRConversionPipeline (-40 lines)
### Code Reduction
- Total reduction: ~115 lines across all patterns
- Zero code duplication in initialization/conversion
- Pattern files: 806 lines total (down from ~920)
### Quality Improvements
- Single source of truth for initialization
- Consistent conversion flow across all patterns
- Guaranteed boundary.loop_var_name setting (prevents SSA-undef bugs)
- Improved maintainability and testability
### Testing
- All 4 patterns tested and passing:
- Pattern 1 (Simple While): ✅
- Pattern 2 (With Break): ✅
- Pattern 3 (If-Else PHI): ✅
- Pattern 4 (With Continue): ✅
### Documentation
- Phase 33-22 inventory and results document
- Updated joinir-architecture-overview.md with new infrastructure
## Breaking Changes
None - pure refactoring with no API changes
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com >
2025-12-07 21:02:20 +09:00
66479f921d
feat(phase106): FileBox provider_lock整理 & Fail-Fast強化(案B統一版)
...
Task 1: CoreBoxId.category() 修正
- File を CoreRequired 側に移動(L126)
- テスト期待値修正(L371)
- Phase 106 intent コメント更新(L107-115)
Task 2: provider_lock API 確認
- 変更なし(既存の set/get API をそのまま使用)
- get_filebox_provider_strict() は追加しない(シンプルに保つ)
Task 3: FileBox SSOT コメント追加
- L5-7 に責務明示コメント追加
Task 4: PluginHost に FileBox provider チェック追加
- with_core_from_registry_optional() に Phase 106 チェック追加(L158-167)
- test_with_core_from_registry_filebox_required() 追加(L413-445)
- 既存テスト2件を FileBox provider 初期化対応(L301-321, L323-351)
- test_with_core_from_registry_missing_box() をエラーメッセージ拡張(L386-410)
Task 5: ドキュメント更新
- core_boxes_design.md に Phase 106 セクション追加(L248-265)
- 責務分離原則・Ring0.FsApi 延期を明記
完了条件:
✅ ビルド成功(cargo build --release)
✅ テスト全PASS(cargo test --lib runtime: 64 passed; 0 failed)
✅ 指示書の実装チェックリスト全て completed
2025-12-03 17:55:26 +09:00
51ff558904
feat(phase32): L-2.1 Stage-1 UsingResolver JoinIR integration + cleanup
...
Phase 32 L-2.1 complete implementation:
1. Stage-1 UsingResolver main line JoinIR connection
- CFG-based LoopForm construction for resolve_for_source/5
- LoopToJoinLowerer integration with handwritten fallback
- JSON snapshot tests 6/6 PASS
2. JoinIR/VM Bridge improvements
- Simplified join_ir_vm_bridge.rs dispatch logic
- Enhanced json.rs serialization
- PHI core boxes cleanup (local_scope_inspector, loop_exit_liveness, loop_var_classifier)
3. Stage-1 CLI enhancements
- Extended args.rs, groups.rs, mod.rs for new options
- Improved stage1_bridge module (args, env, mod)
- Updated stage1_cli.hako
4. MIR builder cleanup
- Simplified if_form.rs control flow
- Removed dead code from loop_builder.rs
- Enhanced phi_merge.rs
5. Runner module updates
- json_v0_bridge/lowering.rs improvements
- dispatch.rs, selfhost.rs, modes/vm.rs cleanup
6. Documentation updates
- CURRENT_TASK.md, AGENTS.md
- Various docs/ updates
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-26 10:17:37 +09:00
8750186e55
chore: Phase 26-H セッション完了 - 全ドキュメント更新
...
Phase 26-H 完了内容:
✅ JoinIR 型定義実装(src/mir/join_ir.rs)
✅ MIR → JoinIR 自動変換実装(lower_min_loop_to_joinir)
✅ 自動変換テスト実装(mir_joinir_min_auto_lowering)
✅ PHI/Loop箱 → JoinIR 移行対応表追加(loopform_ssot.md)
ドキュメント更新:
- Phase 27 JoinIR タスク計画追加
- Phase 26-H タスク完了記録
- 各種 README 更新(進捗反映)
- CURRENT_TASK.md 更新
コミット統計: $(git status --short | wc -l) files changed
次のステップ: Phase 27 一般化 MIR → JoinIR 変換
2025-11-23 05:53:27 +09:00
2692eafbbf
feat(mir): Phase 26-H JoinIR型定義実装完了 - ChatGPT設計
...
## 実装内容(Step 1-3 完全達成)
### Step 1: src/mir/join_ir.rs 型定義追加
- **JoinFuncId / JoinContId**: 関数・継続ID型
- **JoinFunction**: 関数(引数 = φノード)
- **JoinInst**: Call/Jump/Ret/Compute 最小命令セット
- **MirLikeInst**: 算術・比較命令ラッパー
- **JoinModule**: 複数関数保持コンテナ
- **単体テスト**: 型サニティチェック追加
### Step 2: テストケース追加
- **apps/tests/joinir_min_loop.hako**: 最小ループ+breakカナリア
- **src/tests/mir_joinir_min.rs**: 手書きJoinIR構築テスト
- MIR → JoinIR手動構築で型妥当性確認
- #[ignore] で手動実行専用化
- NYASH_JOINIR_EXPERIMENT=1 トグル制御
### Step 3: 環境変数トグル実装
- **NYASH_JOINIR_EXPERIMENT=1**: 実験モード有効化
- **デフォルト挙動**: 既存MIR/LoopForm経路のみ(破壊的変更なし)
- **トグルON時**: JoinIR手書き構築テスト実行
## Phase 26-H スコープ遵守
✅ 型定義のみ(変換ロジックは未実装)
✅ 最小限の命令セット
✅ Debug 出力で妥当性確認
✅ 既存パイプライン無影響
## テスト結果
```
$ NYASH_JOINIR_EXPERIMENT=1 cargo test --release mir_joinir_min_manual_construction -- --ignored --nocapture
[joinir/min] MIR module compiled, 3 functions
[joinir/min] JoinIR module constructed:
[joinir/min] ✅ JoinIR型定義は妥当(Phase 26-H)
test result: ok. 1 passed; 0 failed
```
## JoinIR理論の実証
- **φノード = 関数引数**: `fn loop_step(i, k_exit)`
- **merge = join関数**: 分岐後の合流点
- **ループ = 再帰関数**: `loop_step` 自己呼び出し
- **break = 継続呼び出し**: `k_exit(i)`
## 次フェーズ (Phase 27.x)
- LoopForm v2 → JoinIR 自動変換実装
- break/continue ハンドリング
- Exit PHI の JoinIR 引数化
🌟 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
Co-Authored-By: ChatGPT <noreply@openai.com >
2025-11-23 04:10:12 +09:00
f9d100ce01
chore: Phase 25.1 完了 - LoopForm v2/Stage1 CLI/環境変数削減 + Phase 26-D からの変更
...
Phase 25.1 完了成果:
- ✅ LoopForm v2 テスト・ドキュメント・コメント完備
- 4ケース(A/B/C/D)完全テストカバレッジ
- 最小再現ケース作成(SSAバグ調査用)
- SSOT文書作成(loopform_ssot.md)
- 全ソースに [LoopForm] コメントタグ追加
- ✅ Stage-1 CLI デバッグ環境構築
- stage1_cli.hako 実装
- stage1_bridge.rs ブリッジ実装
- デバッグツール作成(stage1_debug.sh/stage1_minimal.sh)
- アーキテクチャ改善提案文書
- ✅ 環境変数削減計画策定
- 25変数の完全調査・分類
- 6段階削減ロードマップ(25→5、80%削減)
- 即時削除可能変数特定(NYASH_CONFIG/NYASH_DEBUG)
Phase 26-D からの累積変更:
- PHI実装改善(ExitPhiBuilder/HeaderPhiBuilder等)
- MIRビルダーリファクタリング
- 型伝播・最適化パス改善
- その他約300ファイルの累積変更
🎯 技術的成果:
- SSAバグ根本原因特定(条件分岐内loop変数変更)
- Region+next_iパターン適用完了(UsingCollectorBox等)
- LoopFormパターン文書化・テスト化完了
- セルフホスティング基盤強化
Co-Authored-By: Claude <noreply@anthropic.com >
Co-Authored-By: ChatGPT <noreply@openai.com >
Co-Authored-By: Task Assistant <task@anthropic.com >
2025-11-21 06:25:17 +09:00
cbf852b7a4
fix(loop_builder): ValueId(0)パラメータGUARD check削除 - ループ生成バグ修正
...
## 🎯 根本原因(Task先生特定)
- `src/mir/loop_builder.rs` L203-215のGUARD checkが誤動作
- ValueId(0)を「常に未初期化」と判定していたが、実際には**最初のパラメータとして正当**
- skip_whitespace(s, idx)のsがValueId(0)で弾かれ、ループが生成されない
## ✅ 修正内容
- GUARD check完全削除(L203-215)
- 経緯説明コメント追加
## ✅ 修正効果
- ループブロック生成: 33 blocks確認
- 既存テスト: 全PASS(mir_basic_loop, mir_loopform_exit_phi)
- 回帰なし
## ❌ 別問題発見(次のタスク)
- PHI node predecessor mismatch (別バグ)
- これはExit PHI生成の問題
## 📋 調査プロセス
- Step 1-3: 最小再現ケース+Rustテスト作成
- Step 4: Task先生でMIR解析→根本原因特定
- Step 5-6: loop_builder.rs修正
- Step 7: 全確認(既存テスト全PASS)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-20 08:41:37 +09:00
301b1d212a
Phase 21.2 Complete: VM Adapter正規実装 + devブリッジ完全撤去
...
## 🎉 Phase 21.2完全達成
### ✅ 実装完了
- VM static box 永続化(singleton infrastructure)
- devブリッジ完全撤去(adapter_dev.rs削除、by-name dispatch削除)
- .hako正規実装(MirCallV1Handler, AbiAdapterRegistry等)
- text-merge経路完全動作
- 全phase2120 adapter reps PASS(7テスト)
### 🐛 バグ修正
1. strip_local_decl修正
- トップレベルのみlocal削除、メソッド内は保持
- src/runner/modes/common_util/hako.rs:29
2. static box フィールド永続化
- MirInterpreter singleton storage実装
- me parameter binding修正(1:1マッピング)
- getField/setField string→singleton解決
- src/backend/mir_interpreter/{mod,exec,handlers/boxes_object_fields}.rs
3. Map.len alias rc=0修正
- [map/missing]パターン検出でnull扱い(4箇所)
- lang/src/vm/boxes/mir_call_v1_handler.hako:91-93,131-133,151-153,199-201
### 📁 主要変更ファイル
#### Rust(VM Runtime)
- src/backend/mir_interpreter/mod.rs - static box singleton storage
- src/backend/mir_interpreter/exec.rs - parameter binding fix
- src/backend/mir_interpreter/handlers/boxes_object_fields.rs - singleton resolution
- src/backend/mir_interpreter/handlers/calls.rs - dev bridge removal
- src/backend/mir_interpreter/utils/mod.rs - adapter_dev module removal
- src/backend/mir_interpreter/utils/adapter_dev.rs - DELETED (7555 bytes)
- src/runner/modes/vm.rs - static box declaration collection
- src/runner/modes/common_util/hako.rs - strip_local_decl fix
- src/instance_v2.rs - Clone implementation
#### Hako (.hako実装)
- lang/src/vm/boxes/mir_call_v1_handler.hako - [map/missing] detection
- lang/src/vm/boxes/abi_adapter_registry.hako - NEW (adapter registry)
- lang/src/vm/helpers/method_alias_policy.hako - method alias support
#### テスト
- tools/smokes/v2/profiles/quick/core/phase2120/s3_vm_adapter_*.sh - 7 new tests
### 🎯 テスト結果
```
✅ s3_vm_adapter_array_len_canary_vm.sh
✅ s3_vm_adapter_array_len_per_recv_canary_vm.sh
✅ s3_vm_adapter_array_length_alias_canary_vm.sh
✅ s3_vm_adapter_array_size_alias_canary_vm.sh
✅ s3_vm_adapter_map_len_alias_state_canary_vm.sh
✅ s3_vm_adapter_map_length_alias_state_canary_vm.sh
✅ s3_vm_adapter_map_size_struct_canary_vm.sh
```
環境フラグ: HAKO_ABI_ADAPTER=1 HAKO_ABI_ADAPTER_DEV=0
### 🏆 設計品質
- ✅ ハードコード禁止(AGENTS.md 5.1)完全準拠
- ✅ 構造的・一般化設計(特定Box名のif分岐なし)
- ✅ 後方互換性保持(既存コード破壊ゼロ)
- ✅ text-merge経路(.hako依存関係正しくマージ)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-11-07 19:32:44 +09:00
77d4fd72b3
phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
2025-11-06 15:41:52 +09:00
510f4cf523
builder/vm: stabilize json_lint_vm under unified calls
...
- Fix condition_fn resolution: Value call path + dev safety + stub injection
- VM bridge: handle Method::birth via BoxCall; ArrayBox push/get/length/set direct bridge
- Receiver safety: pin receiver in method_call_handlers to avoid undefined use across blocks
- Local vars: materialize on declaration (use init ValueId; void for uninit)
- Prefer legacy BoxCall for Array/Map/String/user boxes in emit_box_or_plugin_call (stability-first)
- Test runner: update LLVM hint to llvmlite harness (remove LLVM_SYS_180_PREFIX guidance)
- Docs/roadmap: update CURRENT_TASK with unified default-ON + guards
Note: NYASH_DEV_BIRTH_INJECT_BUILTINS=1 can re-enable builtin birth() injection during migration.
2025-09-28 12:19:49 +09:00
fd56b8049a
mir: implement proper short-circuit lowering (&&/||) via branch+phi; vm: add NYASH_VM_TRACE exec/phi logs and reg_load diagnostics; vm-fallback: minimal Void guards (push/get_position/line/column), MapBox.birth no-op; smokes: filter builtin Array/Map plugin notices; docs: CURRENT_TASK updated
2025-09-26 03:30:59 +09:00
d9f26d4549
feat: nyash.toml SSOT + using AST統合完了(12時間の戦い)
...
- nyash.tomlを唯一の真実(SSOT)として依存管理確立
- dev/ci/prodプロファイルによる段階的厳格化実装
- AST結合で宣言/式の曖昧性を根本解決
- Fail-Fast原則をCLAUDE.md/AGENTS.mdに明文化
- VM fallbackでもASTベース using有効化(NYASH_USING_AST=1)
- 静的メソッドの is_static=true 修正で解決安定化
- STATICブレークハック既定OFF化で堅牢性向上
🎉 usingシステム完全体への道筋確立!JSONライブラリ・Nyash VM開発が可能に
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-25 16:03:29 +09:00
9b9a91c859
feat: GC機能復活&VM整理&json_native調査完了
...
## 🎉 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 >
2025-09-24 23:27:59 +09:00
c0978634d9
feat: using system完全実装+旧スモークテストアーカイブ完了
...
✅ using nyashstd完全動作(ChatGPT実装)
- builtin:nyashstd自動解決
- 環境変数不要でデフォルト有効
- console.log等の基本機能完備
✅ Fixture plugin追加(テスト用最小構成)
✅ v2スモークテスト構造への移行
✅ 旧tools/test/smoke/削除(100+ファイル)
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-24 21:45:27 +09:00
8e4cadd349
selfhost(pyvm): MiniVmPrints – prefer JSON route early-return (ok==1) to avoid fallback loops; keep default behavior unchanged elsewhere
2025-09-22 07:54:25 +09:00
c55f9d3689
docs(phase-17): add LoopForm Self-Hosting phase with schedule/design/guide; link from AGENTS\n\n- New: docs/development/roadmap/phases/phase-17-loopform-selfhost/{README,SCHEDULE,loopform-design}.md\n- Guide: docs/guides/loopform.md\n- AGENTS: link phase-17 + loopform guide\n
2025-09-19 22:39:04 +09:00
da32455afc
freeze: macro platform complete; default ON with profiles; env consolidation; docs + smokes\n\n- Profiles: --profile {lite|dev|ci|strict} (dev-like default for macros)\n- Macro paths: prefer NYASH_MACRO_PATHS (legacy envs deprecated with warnings)\n- Selfhost pre-expand: auto mode, PyVM-only, add smokes (array/map)\n- Docs: user-macros updated; new macro-profiles guide; AGENTS freeze note; CURRENT_TASK freeze\n- Compat: non-breaking; legacy envs print deprecation notices\n
2025-09-19 22:27:59 +09:00
811e3eb3f8
feat: comprehensive development progress
...
- Pattern matching implementation extended in match_expr.rs
- CLI configuration structured with categorized groups (task recommendation completed)
- Python LLVM builder split into function_lower.py (task recommendation completed)
- parse_box_declaration massive function refactored (task recommendation completed)
- Phase 16 Macro Revolution comprehensive planning and documentation
- Archive legacy phase documentation for clean structure
- HTTP message box improvements and performance optimizations
- MIR builder enhancements and control flow improvements
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-19 15:11:57 +09:00
4f82edf901
llvm: gate empty PHI sanitize behind NYASH_LLVM_SANITIZE_EMPTY_PHI=1; docs: AGENTS.md note. perf: begin clone() reduction plan — TypeBox.name/type_parameters to Arc<str>, adjusted builders/registry; no behavior change
2025-09-19 11:54:28 +09:00
7dfd55bfdb
pyvm: implement TypeOp(check) + strict match-guard smokes; parser: guard support in match; llvm: PHI wiring at block head + incoming normalization; docs: AGENTS LLVM/PHI + guard policy; add tests; plan: refactor parse_box_declaration + TODO triage + clone reduction + CLI split + LLVM builder split; update CURRENT_TASK.md
2025-09-19 10:52:57 +09:00
d99b941218
docs: add MIR13 mode doc and set PHI-off as default; bridge lowering split (if/loop/try); llvmlite resolver stabilization; curated runner default PHI-off; refresh CURRENT_TASK.md
2025-09-17 10:58:12 +09:00
adbfbb2c76
ci: add GitHub Actions workflow; runner: prefer PyVM in selfhost paths; stage3: add LLVM + bridge acceptance smokes; docs: update env flags
2025-09-17 01:20:15 +09:00
d90216e9c4
📚 Phase 15 - セルフホスティング戦略の明確化とEXE-first実装
...
## 主な変更点
### 🎯 戦略の転換と明確化
- PyVMを開発ツールとして位置づけ(本番経路ではない)
- EXE-first戦略を明確に優先(build_compiler_exe.sh実装済み)
- Phase順序の整理: 15.2(LLVM)→15.3(コンパイラ)→15.4(VM)
### 🚀 セルフホスティング基盤の実装
- apps/selfhost-compiler/にNyashコンパイラMVP実装
- compiler.nyash: メインエントリー(位置引数対応)
- boxes/: parser_box, emitter_box, debug_box分離
- tools/build_compiler_exe.sh: ネイティブEXEビルド+dist配布
- Python MVPパーサーStage-2完成(local/if/loop/call/method/new)
### 📝 ドキュメント整備
- Phase 15 README/ROADMAP更新(Self-Hosting優先明記)
- docs/guides/exe-first-wsl.md: WSLクイックスタート追加
- docs/private/papers/: 論文G~L、爆速事件簿41事例収録
### 🔧 技術的改善
- JSON v0 Bridge: If/Loop PHI生成実装(ChatGPT協力)
- PyVM/llvmliteパリティ検証スイート追加
- using/namespace機能(gated実装、Phase 15では非解決)
## 次のステップ
1. パーサー無限ループ修正(未実装関数の実装)
2. EXEビルドとセルフホスティング実証
3. c0→c1→c1'ブートストラップループ確立
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-15 18:44:49 +09:00
335aebb041
🏗️ Refactor: Split massive codegen.rs (2522 lines) into modular structure
...
Thanks to Codex's powerful refactoring\!
- codegen.rs → codegen/ directory with 3 focused modules
- mod.rs (1498 lines) - main compilation flow
- instructions.rs (1121 lines) - MIR instruction implementations
- types.rs (189 lines) - type conversion helpers
Benefits:
- Much easier to locate errors and debug
- Better separation of concerns
- Enables parallel development
- Maintains API compatibility
Co-authored-by: Codex <codex@openai.com >
2025-09-11 17:34:30 +09:00
b8bdb867d8
Merge selfhosting-dev into main (Core-13 pure CI/tests + LLVM bridge) ( #126 )
...
* WIP: sync before merging origin/main
* fix: unify using/module + build CLI; add missing helper in runner; build passes; core smokes green; jit any.len string now returns 3
* Apply local changes after merging main; keep docs/phase-15 removed per main; add phase-15.1 docs and tests
* Remove legacy docs/phase-15/README.md to align with main
* integration: add Core-13 pure CI, tests, and minimal LLVM execute bridge (no docs) (#125 )
Co-authored-by: Tomoaki <tomoaki@example.com >
---------
Co-authored-by: Selfhosting Dev <selfhost@example.invalid >
Co-authored-by: Tomoaki <tomoaki@example.com >
2025-09-07 07:36:15 +09:00
be8593fb02
jit/mir: fix String.len return-type inference; stabilize jit-direct returns; add CLIF/sig/call tracing; host-bridge console thunks; update AGENTS.md for Cranelift focus
2025-09-06 12:05:35 +09:00
d631beba37
dev: add selfhosting/cranelift workspaces; jit: add return materialization, ret_slot, hostcall arity pad, and dbg imports for diagnosis
2025-09-06 10:59:33 +09:00
7d88c04c0e
wip(phase15): AOT修正作業中 - Nyプラグインと標準ライブラリ実装
...
Phase 15のAOT/ネイティブビルド修正作業を継続中。
ChatGPTによるstd実装とプラグインシステムの改修を含む。
主な変更点:
- apps/std/: string.nyashとarray.nyashの標準ライブラリ追加
- apps/smokes/: stdライブラリのスモークテスト追加
- プラグインローダーv2の実装改修
- BoxCallのハンドル管理改善
- JIT hostcall registryの更新
- ビルドスクリプト(build_aot.sh, build_llvm.sh)の調整
まだ修正作業中のため、一部の機能は不完全な状態。
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-06 06:24:08 +09:00
e323120c59
phase15: update CLAUDE.md with Phase 15 enhancements from AGENTS.md
...
- Add JIT Self-Host Quickstart section for Phase 15
- Include important flags reference (plugins, parsers, debugging)
- Add Codex async workflow documentation for parallel tasks
- Update test execution with Phase 15 smoke tests
- Improve build time notes (JIT vs LLVM)
- Align with current Phase 15 progress and tooling
🎉 Bootstrap (c0→c1→c1') test confirmed working\!
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-05 15:18:13 +09:00
19f775c34d
feat(phase12.7): 糖衣構文Phase 12.7-B完了 + 自律型AI開発システム制御機能
...
🚀 Phase 12.7-B: ChatGPT5糖衣構文(基本実装完了)
- パイプライン演算子(|>)実装
- セーフアクセス(?.)とデフォルト値(??)実装
- sugar gateによる段階的有効化機能
- 糖衣構文テストスイート追加
🤖 自律型AI開発システム改善
- codex-async-notify.sh: タスク制御指示追加
- "下の箱を積み過ぎないように先に進んでください"
- "フェーズが終わったと判断したら止まってください"
- プロセス数表示機能の改善(count_running_codex_display)
- 自動停止機能が正常動作(Phase 12.7-C前で停止確認)
📚 ドキュメント更新
- Paper 13: 自律型AI協調開発システムの革新性を文書化
- ANCP可逆マッピング仕様追加
- nyfmt PoC(フォーマッター)計画追加
🧱 箱理論の体現
- 74k行のコードベース(Phase 15で20k行を目指す)
- ANCP適用で最終的に6k行相当を狙う
- 世界最小の実用コンパイラへの道
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-05 05:16:21 +09:00
c5637b4de5
docs: AGENTS.mdにCodex非同期ワークフローの実運用メモを追加
...
- codex-async-notify.shとcodex-keep-two.shの使い方
- プロセス制御と上限設定の詳細
- tmux通知の4行フォーマット説明
- 日本語メモで実際の運用方法を記載
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-04 20:15:07 +09:00
11506cee3b
Phase 11-12: LLVM backend initial, semantics layer, plugin unification
...
Major changes:
- LLVM backend initial implementation (compiler.rs, llvm mode)
- Semantics layer integration in interpreter (operators.rs)
- Phase 12 plugin architecture revision (3-layer system)
- Builtin box removal preparation
- MIR instruction set documentation (26→Core-15 migration)
- Cross-backend testing infrastructure
- Await/nowait syntax support
New features:
- LLVM AOT compilation support (--backend llvm)
- Semantics layer for interpreter→VM flow
- Tri-backend smoke tests
- Plugin-only registry mode
Bug fixes:
- Interpreter plugin box arithmetic operations
- Branch test returns incorrect values
Documentation:
- Phase 12 README.md updated with new plugin architecture
- Removed obsolete NYIR proposals
- Added LLVM test programs documentation
Co-Authored-By: Claude <noreply@anthropic.com >
2025-09-01 23:44:34 +09:00