Files
hakorune/src
tomoaki d9ff3f60ff refactor(joinir): Phase 260 P0.1 Step 4 - Extract type_propagation.rs (70 lines)
Extract propagate_value_type_for_inst to dedicated type_propagation module.
Handles type info flow from JoinIR→MIR merge (SSOT + fallback inference).

Changes:
- NEW: rewriter/type_propagation.rs - propagate_value_type_for_inst
- CHANGED: instruction_rewriter.rs - import from type_propagation (deleted local fn)
- CHANGED: rewriter/mod.rs - declare type_propagation module

Design:
- SSOT: Prefer type info from JoinIR source function metadata
- Fallback: Infer from instruction structure (Const/Copy/BinOp/Compare)
- LLVM: Ensures '+' stays numeric (not concat_hh_mixed)

Reduction:
- instruction_rewriter.rs: 1466 → 1396 lines (-70)

Next: Start terminator.rs extraction (Branch/Jump/Return remapping)
2025-12-21 06:11:53 +09:00
..