Normalize passes keep spans and clean warnings

This commit is contained in:
nyash-codex
2025-11-24 15:02:51 +09:00
parent 466e636af6
commit da1a5558e5
40 changed files with 547 additions and 362 deletions

View File

@ -3,6 +3,7 @@ use super::merge::new_block;
use super::ternary;
use super::BridgeEnv;
use crate::mir::{BasicBlockId, ConstValue, EffectMask, MirFunction, MirInstruction, ValueId};
use crate::ast::Span;
use std::collections::BTreeMap;
use super::super::ast::ExprV0;
@ -290,7 +291,13 @@ pub(super) fn lower_expr_with_scope<S: VarScope>(
} else {
inputs.push((fall_bb, rval));
}
crate::mir::ssot::cf_common::insert_phi_at_head(f, merge_bb, out, inputs);
crate::mir::ssot::cf_common::insert_phi_at_head_spanned(
f,
merge_bb,
out,
inputs,
Span::unknown(),
);
Ok((out, merge_bb))
}
ExprV0::Call { name, args } => {