mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-20 03:43:51 +00:00
Estimated hours taken: 4
Branches: main
Fix a problem in region handling spotted by Quan Phan: when a model_semi
disjunction commits to a non-last disjunct, we need to clean up the disj frame
it allocated.
This diff should have no effect in non-rbmm grades.
compiler/disj_gen.m:
In model_semi disjunctions, invoke a cleanup instruction on exit from
non-last disjuncts.
compiler/llds.m:
Add a representation for this cleanup instruction as a new region op.
compiler/llds_out.m:
compiler/opt_debug.m:
Handle the new region op.
runtime/mercury_region.h:
Add a draft implementation of this cleanup instruction; the remainder
is up to Quan.
tests/hard_coded/semi_disj.{m,exp}:
New test case to test the fix (for now, only by examining the generated
C code).
tests/hard_coded/Mmakefile:
Enable the new test case.
5 lines
40 B
Plaintext
5 lines
40 B
Plaintext
success: 11
|
|
failure
|
|
success: 13
|
|
failure
|