Commit Graph

11 Commits

Author SHA1 Message Date
51359574d9 feat(stage1): Phase 25.1 - Stage1 CLI デバッグ改善 + 環境変数削減計画
-  Stage1 CLI デバッグログ追加
  - lang/src/runner/stage1_cli.hako: STAGE1_CLI_DEBUG対応
  - 各関数でentry/exit/状態ログ出力
  - SSAバグ調査を容易化

-  Rust bridge 実装
  - src/runner/stage1_bridge.rs: 子プロセス起動・環境変数配線
  - NYASH_ENTRY設定、モジュールリスト生成

-  デバッグヘルパースクリプト
  - tools/stage1_debug.sh: 環境変数自動診断・詳細ログ
  - tools/stage1_minimal.sh: 推奨5変数のみで実行

-  環境変数削減計画(25個→5個)
  - docs/development/proposals/env-var-reduction-report.md
    - 使用箇所マトリックス、依存関係グラフ
    - 6段階削減ロードマップ(80%削減目標)
  - docs/development/proposals/stage1-architecture-improvement.md
    - 他言語事例調査(Rust/Go/Nim)
    - アーキテクチャ統一案、実装ロードマップ

-  LoopForm v2 設計ドキュメント
  - docs/development/roadmap/phases/phase-25.1/stage1-usingresolver-loopform.md

🎯 成果: Stage1起動の複雑さを可視化、80%削減計画確立
2025-11-21 06:22:02 +09:00
d2d76694af docs(phi): Phase 26-B完了記録 - リファクタリング計画更新
Phase 1 (Phase 26-B) 完了を記録:
- PhiInputCollector実装完了 
- BodyLocalPhiBuilder実装完了 
- 既存コード統合完了(loopform_builder/loop_builder/json_v0_bridge)
- テスト全PASS(mir_loopform_exit_phi 4/4)
- ドキュメント完備

次のステップ: Phase 2 (LoopSnapshotManager + HeaderPhiBuilder)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 20:18:33 +09:00
38155fbb75 docs: PHI箱化リファクタリング完全計画書作成
📦 箱理論による段階的リファクタリング計画

 現状分析完了
  - 既存Box: 1,246行(3つのBox完璧実装)
  - 問題箇所: loopform_builder.rs 1,075行(責任混在)

🎯 提案6つのBox
  Phase 1(最優先):
    - PhiInputCollector: PHI入力収集統一(80行削減)
    - BodyLocalPhiBuilder: BodyLocal処理専門(60行削減)
  Phase 3(最重要):
    - ExitPhiBuilder: Exit PHI完全分離(220行削減)

📊 削減効果
  - 合計削減: 620行
  - 最大関数: 173行→50行以下(71%削減)
  - テストカバレッジ: 60%→90%(+50%向上)

📚 完全ドキュメント内容
  - 詳細設計(責任・インターフェース・実装例)
  - 段階的実装計画(Phase 1-4)
  - テスト戦略・リスク分析
  - Before/After比較図・依存関係図

🎓 箱理論4原則完全準拠
  - 分離・境界・可逆性・テスト容易性

Task先生による徹底分析完了!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-20 17:26:47 +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
b3a96faccb smokes: add JSON nested/invalid cases; force VM backend; temp nyash.toml with json_native package for resolution 2025-09-26 00:38:14 +09:00
6ce06501e1 json-native: enable float roundtrip in parser (NUMBER => float by '.'/exp); expand roundtrip smoke with more numeric cases 2025-09-26 00:32:20 +09:00
85084664c2 docs+runner+parser: SSOT+AST using finalized (legacy text inlining removed); provider verify reads nyash.toml; preflight warn hook; method-body guard removed; CURRENT_TASK updated for next JSON work 2025-09-26 00:27:02 +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
f1a4a78379 Docs: mark PoC features as deprecated (unified ops are default)
- mir_typeop_poc / mir_refbarrier_unify_poc are no-op now; Builder emits
  TypeOp/WeakRef/Barrier by default; Optimizer normalizes legacy ops.
- Update CURRENT_TASK and architecture/proposal docs accordingly.
2025-08-26 06:41:30 +09:00
fffbac9aac feat: MIR TypeOp/WeakRef/Barrier PoC implementation
- Add TypeOpKind, WeakRefOp, BarrierOp enums for unified instructions
- Implement TypeOp instruction combining TypeCheck/Cast
- Implement WeakRef instruction combining WeakNew/WeakLoad
- Implement Barrier instruction combining BarrierRead/BarrierWrite
- Update VM to handle new unified instructions
- Update MIR printer for new instruction formats
- Add feature flags mir_typeop_poc and mir_refbarrier_unify_poc
- Maintain backward compatibility with legacy instructions

This is Phase 8.5 MIR instruction diet PoC implementation.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 19:27:02 +09:00
cc2a820af7 feat(plugin): Fix plugin BoxRef return and Box argument support
- Fixed deadlock in FileBox plugin copyFrom implementation (single lock)
- Added TLV Handle (tag=8) parsing in calls.rs for returned BoxRefs
- Improved plugin loader with config path consistency and detailed logging
- Fixed loader routing for proper Handle type_id/fini_method_id resolution
- Added detailed logging for TLV encoding/decoding in plugin_loader_v2

Test docs/examples/plugin_boxref_return.nyash now works correctly:
- cloneSelf() returns FileBox Handle properly
- copyFrom(Box) accepts plugin Box arguments
- Both FileBox instances close and fini correctly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-21 00:41:26 +09:00