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
This commit is contained in:
nyash-codex
2025-12-10 00:01:53 +09:00
parent 577b5b01d5
commit d7805e5974
138 changed files with 3529 additions and 378 deletions

View File

@ -11,7 +11,7 @@ PyVMは**一般的なプログラム実行には使用しないでください**
#### 1. JSON v0ブリッジ機能
```bash
# セルフホスティング実行PyVM自動使用
NYASH_SELFHOST_EXEC=1 ./target/release/nyash program.hako
NYASH_SELFHOST_EXEC=1 ./target/release/hakorune program.hako
```
- **用途**: Rust→Python連携でMIR JSON生成
- **重要性**: Phase 15.3コンパイラMVP開発に必須
@ -20,7 +20,7 @@ NYASH_SELFHOST_EXEC=1 ./target/release/nyash program.hako
#### 2. using処理共通パイプライン
```bash
# using前処理PyVM内部使用
./target/release/nyash --enable-using program_with_using.hako
./target/release/hakorune --enable-using program_with_using.hako
```
- **用途**: `strip_using_and_register`統一処理
- **重要性**: Rust VM・LLVMとの共通前処理基盤
@ -29,7 +29,7 @@ NYASH_SELFHOST_EXEC=1 ./target/release/nyash program.hako
#### 3. サンドボックス実行環境
```bash
# 開発者の明示的使用(上級者のみ)
NYASH_VM_USE_PY=1 ./target/release/nyash program.hako
NYASH_VM_USE_PY=1 ./target/release/hakorune program.hako
```
- **用途**: 安全なコード実行制御、実験的検証
- **対象**: 開発者・研究者の明示的使用のみ
@ -39,7 +39,7 @@ NYASH_VM_USE_PY=1 ./target/release/nyash program.hako
#### 1. 一般的なプログラム実行
```bash
# ❌ 使わないでください
NYASH_VM_USE_PY=1 ./target/release/nyash my_application.hako
NYASH_VM_USE_PY=1 ./target/release/hakorune my_application.hako
# ✅ 代わりにこれを使用
./target/release/nyash my_application.hako # Rust VM
@ -156,4 +156,4 @@ NYASH_VM_USE_PY=1 ./target/release/nyash hello_world.hako
- **非推奨**: 一般実行・性能測定・新機能開発
- **推奨**: Rust VM開発+ LLVM本番の2本柱
この方針により、Phase 15の開発効率を最大化し、重要機能を安全に保持できます。
この方針により、Phase 15の開発効率を最大化し、重要機能を安全に保持できます。