Files
hakorune/CURRENT_TASK.md
tomoaki edc7355937 refactor(joinir): unify boundary join_inputs SSOT (pattern4/6/7)
Apply Phase 256.8 SSOT fix to Pattern4/6/7:
- Use join_module.entry.params.clone() instead of hardcoded ValueIds
- Add fail-fast validation for params count mismatch
- Remove ValueId(0), ValueId(PARAM_MIN + k) patterns
- Clean up unused PARAM_MIN imports

This prevents entry_param_mismatch errors structurally and maintains
consistency with Pattern2/3.

Changes:
- pattern4_with_continue.rs: Lines 442-476 (SSOT extraction + validation)
- pattern6_scan_with_init.rs: Lines 447-471 (SSOT extraction + validation)
- pattern7_split_scan.rs: Lines 495-526 (SSOT extraction + validation)

All patterns now use the same SSOT principle:
1. Extract entry function (priority: join_module.entry → fallback "main")
2. Use params as SSOT: join_inputs = entry_func.params.clone()
3. Build host_inputs in expected order (pattern-specific)
4. Fail-fast validation: join_inputs.len() == host_inputs.len()

Verification:
- cargo build --release:  PASS (no PARAM_MIN warnings)
- Quick profile:  First FAIL still json_lint_vm (baseline maintained)
- Pattern6 smoke:  PASS (index_of test)
- Pattern7 smoke: Pre-existing phi pred mismatch (not introduced by SSOT)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-20 20:05:11 +09:00

3.5 KiB
Raw Blame History

CURRENT_TASK (moved)

Status: SSOT
Scope: Repo root の旧リンク互換。現行の入口は docs/development/current/main/10-Now.md

  • Now: docs/development/current/main/10-Now.md
  • Backlog: docs/development/current/main/30-Backlog.md

Handoff (current)

状況SSOT

  • 現行の入口: docs/development/current/main/10-Now.md
  • 次の候補: docs/development/current/main/30-Backlog.md
  • Design goal: docs/development/current/main/design/join-explicit-cfg-construction.md

直近の道筋JoinIR / Normalized

設計方針メモSSOT候補

  • ExprLowererBox式SSOT

    • 役割: AST(expr)(prelude: Vec<Inst>, value: ValueId)ANF含む
    • pure/impure/whitelist/strict の契約を集約入口SSOT
  • ConditionLowererBox条件→分岐SSOT

    • 役割: AST(cond)BranchPlan(短絡なら分岐語彙で組む)
    • 評価順は ExprLowererBox に委譲ANFで順序固定
    • &&/|| は制御として扱い、式で無理しない
  • ControlLowererBox制御SSOT

    • 役割: StepNode/ControlTree → JoinIR継続 + env
    • if/loop はここ、条件の中身は ConditionLowererBox に委譲
  • Phase 139: if-only post_k の return lowering を ReturnValueLowererBox に統一DONE

    • docs/development/current/main/phases/phase-139/README.md
  • Phase 140: NormalizedExprLowererBox 初版pure expression のみDONE

    • SSOT: docs/development/current/main/design/normalized-expr-lowering.md
    • docs/development/current/main/phases/phase-140/README.md
  • Phase 141 P0: impure 拡張点contractを SSOT 化Call/MethodCall はまだ out-of-scopeDONE

    • docs/development/current/main/phases/phase-141/README.md
  • Phase 141 P1: “既知 intrinsic だけ” を許可して段階投入DONE

    • docs/development/current/main/phases/phase-141/README.md
  • Phase 141 P1.5: known intrinsic registry + available_inputs 3-source merge + diagnosticsDONE

    • docs/development/current/main/phases/phase-141/README.md
  • Phase 142-loopstmt P0: 正規化単位を statementloop 1個へ寄せるDONE

    • docs/development/current/main/phases/phase-142-loopstmt/README.md
  • Phase 142-loopstmt P1: LLVM EXE smoke同 fixtureを追加DONE

    • docs/development/current/main/phases/phase-142-loopstmt/README.md
  • Phase 141 P2+: Call/MethodCalleffects + typingを分離して段階投入

    • Historical context: docs/development/current/main/investigations/joinir-generalization-study.md
  • Phase 143-loopvocab P0/P1: loop 内 if/break/continue の語彙追加DONE

    • docs/development/current/main/phases/phase-143-loopvocab/README.md
  • Phase 143-loopvocab P2: else 対称化B-C / C-BDONE

    • docs/development/current/main/phases/phase-143-loopvocab/README.md
  • Phase 145-anf P0/P1/P2: ANFimpure hoist + 再帰的線形化DONE

    • docs/development/current/main/phases/phase-145-anf/README.md
  • Phase 146in progress: Loop/If 条件式へ ANF を横展開(順序固定と診断)

    • docs/development/current/main/phases/phase-146/README.md

Resolved (historical)

WSL EXDEV / cargo build failure (resolved)

  • 2025-12-18: Invalid cross-device link (os error 18) により cargo build が失敗する事象があったが、wsl --shutdown 再起動後に復旧。
  • 再発時のワークアラウンド: tools/build_llvm.sh は EXDEV を避けるため TMPDIRtarget/... 配下へ寄せる。