mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
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:
@@ -368,7 +368,8 @@ impl<'a> Compiler<'a> {
|
||||
self.expect_binding_plan_for_expr(arg, &context_desc)?;
|
||||
|
||||
if let BindingPlan::Parameter { .. } = &binding_plan {
|
||||
self.apply_binding_plan(&binding_plan, param_reg, arg.span())
|
||||
let _ = self
|
||||
.apply_binding_plan(&binding_plan, param_reg, arg.span())
|
||||
.map_err(|e| CompilerError::from(e).at(arg.span()))?;
|
||||
} else {
|
||||
return Err(CompilerError::UnexpectedBindingPlan {
|
||||
|
||||
Reference in New Issue
Block a user