[m-dev.] for review: typeinfo-liveness bug fix
Mark Anthony BROWN
dougl at cs.mu.OZ.AU
Thu Jul 20 15:15:27 AEST 2000
Zoltan Somogyi writes:
> For review by anyone.
>
> compiler/liveness.m:
> Fix a bug: the compiler did not make sure that the sets of variables
> in resume_points satisfy the requirements of typeinfo liveness when
> required (i.e. it included variables in the resume point set without
> also including the typeinfos describing their types). This lead to a
> compiler abort when compiling with options (e.g. --trace deep) that
> imply typeinfo liveness.
>
> tests/debugger/resume_typeinfos.{m,inp,exp,exp2}
> A test case to exercise the fix.
>
> tests/debugger/Mmakefile:
> Enable the new test case, and put the test list back into alphabetic
> order.
>
> Zoltan.
>
Apart from the comments below, this change looks fine.
Cheers,
Mark.
> @@ -777,6 +783,14 @@
> % we stop generating code after the first cannot_fail disjunct.
> % Second, an empty pruned disjunction is legal, while an empty
> % nondet disjunction isn't.
> + %
> + % For both kinds of disjunctions, the resume points to be attached to
> + % the non-last disjuncts must be completed with the required typeinfos
> + % if --typeinfo-liveness is set. ResumeVars0 should already be so
> + % completed, so need only completed the sets added here.
That sentence doesn't quite make sense.
> Index: tests/debugger/Mmakefile
> ===================================================================
> RCS file: /home/mercury1/repository/tests/debugger/Mmakefile,v
> retrieving revision 1.41
> diff -u -b -r1.41 Mmakefile
> --- tests/debugger/Mmakefile 2000/06/19 07:59:18 1.41
> +++ tests/debugger/Mmakefile 2000/07/17 22:52:48
> @@ -30,9 +30,10 @@
> loopcheck \
> mdb_command_test \
> multi_parameter \
> + polymorphic_output \
> queens \
> - shallow \
> - polymorphic_output
> + resume_typeinfos \
> + shallow
Doesn't this test require a special rule in the Mmakefile, like the
other tests in this directory?
>
> # The following tests are disabled, since currently they get some spurious
> # failures if readline support is enabled:
> Index: tests/debugger/resume_typeinfos.exp
> ===================================================================
> RCS file: resume_typeinfos.exp
> diff -N resume_typeinfos.exp
> --- /dev/null Thu Mar 4 04:20:11 1999
> +++ resume_typeinfos.exp Mon Jul 17 18:40:42 2000
> @@ -0,0 +1,14 @@
> + 1: 1 1 CALL pred resume_typeinfos:main/2-0 (det) resume_typeinfos.m:25
> +mdb> echo on
> +Command echo enabled.
> +mdb> context none
> +Contexts will not be printed.
> +mdb> goto 5
> + 5: 4 3 CALL pred list:length/2-0 (det)
> +mdb> finish
> + 15: 4 3 EXIT pred list:length/2-0 (det)
> +mdb> print *
> + HeadVar__1 [1, 2]
> + HeadVar__2 2
> +mdb> continue
> +no solution.
> Index: tests/debugger/resume_typeinfos.exp2
> ===================================================================
> RCS file: resume_typeinfos.exp2
> diff -N resume_typeinfos.exp2
> --- /dev/null Thu Mar 4 04:20:11 1999
> +++ resume_typeinfos.exp2 Mon Jul 17 18:40:42 2000
> @@ -0,0 +1,14 @@
> + 1: 1 1 CALL pred resume_typeinfos:main/2-0 (det) resume_typeinfos.m:25
> +mdb> echo on
> +Command echo enabled.
> +mdb> context none
> +Contexts will not be printed.
> +mdb> goto 5
> + 5: 4 3 CALL pred list:length/2-0 (det)
> +mdb> finish
> + 15: 4 3 EXIT pred list:length/2-0 (det)
> +mdb> print *
> + HeadVar__1 [1, 2]
> + HeadVar__2 2
> +mdb> continue
> +no solution.
Is there any difference in the above two files? If not, why is the
second one required?
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list