feat: Soft-assert mode for builtin out-params under not

- Add a scoped soft_assert_mode to the compiler so `not` statements compile their subexpressions without emitting hard AssertCondition/AssertNotUndefined instructions.
- Teach binding-plan application to return an optional result register; equality plans now yield a boolean in soft mode, allowing not abs(-5 , 3) to succeed instead of aborting.
- Update function-call, loop, and rule plumbing to consume the new binding-plan outcome, including copying the produced register when an out-parameter equality is used.
- Trim the OPA TODO list to the remaining troublesome folders.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2025-12-02 15:06:23 -06:00
parent 30bd134a0b
commit b7b3d3ec87
10 changed files with 83 additions and 80 deletions
+13 -2
View File
@@ -117,9 +117,20 @@ impl<'a> Compiler<'a> {
}
if let Some((plan, plan_span)) = &out_param_plan {
self.apply_binding_plan(plan, dest, plan_span)
let plan_result = self
.apply_binding_plan(plan, dest, plan_span)
.map_err(|err| CompilerError::from(err).at(plan_span))?;
self.emit_instruction(Instruction::LoadBool { dest, value: true }, &span);
if let Some(result_reg) = plan_result {
self.emit_instruction(
Instruction::Move {
dest,
src: result_reg,
},
&span,
);
} else {
self.emit_instruction(Instruction::LoadBool { dest, value: true }, &span);
}
}
Ok(dest)