feat: add expression statements and assign expressions

This commit is contained in:
2026-04-21 23:18:13 +02:00
parent 3fe307eff8
commit 68ec14e541
7 changed files with 190 additions and 5 deletions
+3
View File
@@ -29,6 +29,9 @@ fn optimize_function(func: &mut MirFunction) {
// Replace the complex instruction with a simple constant use
*rvalue = Rvalue::Use(Operand::Constant(constant.clone()));
known_constants.insert(*local, constant);
} else {
// Reassigned to a non-computable value; remove older cached inferences
known_constants.remove(local);
}
}