refactor(mir): phase260 p0.1 strangler hardening + smoke fixtures

This commit is contained in:
2025-12-21 05:47:37 +09:00
parent 4dfe3349bf
commit 1fe5be347d
28 changed files with 442 additions and 504 deletions

View File

@ -399,8 +399,7 @@ pub fn normalize_legacy_instructions(
}
other => other,
};
block.terminator = Some(rewritten);
block.terminator_span = Some(span);
block.set_terminator_with_span(rewritten, span);
}
let (insts, spans): (Vec<_>, Vec<_>) =
@ -508,7 +507,7 @@ pub fn normalize_ref_field_access(
if let Some(term) = block.terminator.take() {
let term_span = block.terminator_span.take().unwrap_or_else(Span::unknown);
block.terminator = Some(match term {
let rewritten = match term {
I::RefGet {
dst,
reference,
@ -557,10 +556,8 @@ pub fn normalize_ref_field_access(
}
}
other => other,
});
if block.terminator_span.is_none() {
block.terminator_span = Some(term_span);
}
};
block.set_terminator_with_span(rewritten, term_span);
}
block.effects = block