refactor(llvm): Phase 132-P1 follow-up - bind block_end_values and clear predeclared PHIs
This commit is contained in:
@ -110,3 +110,24 @@ JoinIR merge の契約検証(debug build)で **早期に Fail-Fast** する
|
||||
期待される振る舞い:
|
||||
- debug build では compile/run 中に panic で即停止(原因と修正案が出る)
|
||||
- release build の既定挙動は変えない(検証は `debug_assertions` のみ)
|
||||
|
||||
---
|
||||
|
||||
## 追加: Phase 132-P1(LLVM Python)FunctionLowerContext Box
|
||||
|
||||
Phase 131–132 で顕在化した「関数間の状態漏洩(block id / value id の衝突)」を、
|
||||
tuple-key の小手先ではなく **構造で根治**するために、関数ローカル状態を 1 箱に隔離した。
|
||||
|
||||
- 実装: `src/llvm_py/context/function_lower_context.py`
|
||||
- 統合: `src/llvm_py/builders/function_lower.py`
|
||||
|
||||
箱の責務(SSOT):
|
||||
- `block_end_values`(snapshot)
|
||||
- `def_blocks`
|
||||
- `jump_only_blocks`
|
||||
- `phi_manager`
|
||||
- resolver caches(i64/ptr/f64/end_i64 など)
|
||||
|
||||
狙い:
|
||||
- 関数単位で state を自動破棄し、cross-function collision を “起こせない構造” にする
|
||||
- 追加の手動クリアや tuple-key を不要にする
|
||||
|
||||
Reference in New Issue
Block a user