[m-rev.] for review: --trace shallow variable liveness problem (2)

Peter Ross pdross at gmail.com
Fri Oct 30 12:40:26 AEDT 2009


On Wed, Oct 28, 2009 at 3:45 PM, Peter Wang <novalazy at gmail.com> wrote:
> Branches: main
>
> Revert a change committed on 2009-08-21 to prevent a compiler abort when using
> --trace shallow on a test case.  The change caused aborts with other modules.
> Fix the original bug a different way, and another bug with --trace shallow.
>
> compiler/live_vars.m:
>        Revert the old change.
>
>        Add a check that variables needed across a call do not appear in the
>        post-death set of that call.
>
>        Only add typeinfo variables to the set of variables needed across a
>        call for output variable which are not local to the call.  Otherwise
>        the sanity check fails on livevars_shallow2.m.
>
> compiler/liveness.m:
>        A switch variable which needs to be added to the pre-death set of a
>        case may require typeinfo variables which describe the type of that
>        variable to be added to the pre-death set as well.  This fixes the
>        problem with livevars_shallow.m.
>
> tests/valid/livevars_shallow.m:
>        Replace this test case by another derived from the same original file.
>
> tests/valid/Mercury.options:
> tests/valid/Mmakefile:
> tests/valid/livevars_shallow2.m:
>        Add test case.
>
I'm not an expert in this area, but for me the diff looks fine.

--------------------------------------------------------------------------
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