[m-rev.] diff: fix mantis bug 109
Julien Fischer
juliensf at csse.unimelb.edu.au
Tue Sep 14 15:23:05 AEST 2010
On Tue, 14 Sep 2010, Zoltan Somogyi wrote:
> Fix Mantis bug #109.
>
> compiler/add_heap_ops.m:
> Fix the bug. The bug was that this pass tried to record the heap
> pointer at the start of the nth disjunct, even in cases where
> there were no following disjuncts at whose starts that saved
> heap pointer could be restored (to recover the memory allocated
> by the nth disjunct). The symptom was a disjunction with only
> one disjunct, but the problem was a simple semantic one. The fix
> is simply to say that we won't record the heap pointer before the nth
> disjunct unless disjunct n+1 exists.
>
> Improve the generated HLDS in another way as well: wrap the appropriate
> kind of promise_purity scope around the transformed code (which uses
> impure primitives).
>
> tests/valid/bug109.m:
> Add the regression test for this bug.
>
> tests/valid/Mmakefile:
> tests/valid/Mercury.options:
> Enable the test case.
I have merged this onto the 10.04 branch.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list