Files
mercury/compiler
Paul Bone 3452e25fd6 Improve tail call warnings for the low level C grade.
This patch reduces spurious tail call warnings by warning only for the last
of a sequence of recursive calls along an execution path, for example it
no-longer emits a warning for the first of the two recursive calls in
quicksort.  I have already made a change to this effect for the MLDS
backends.

This patch also implements the new the require_tail_recursion pragma.  This
change has already been made for the MLDS backends.

The require_tail_recursion pragma does not yet handle mutual recursion or
raise an error if the code is not recursive at all.  These will be my next
tasks.

compiler/mark_tail_calls.m:
    Combine marking tail calls with warning about tail calls.

    Handle scopes more accurately.

compiler/mercury_compile_llds_back_end.m:
    Conform to changes in mark_tail_calls.m

    No longer warn for tail calls, this is now done in the same pass that
    marks tail calls.  The decision to run this pass is now made on a
    per-procedure basis and in mark_tail_calls.m

tests/invalid/require_tailrec_1.m:
tests/invalid/require_tailrec_2.m:
tests/invalid/Mmakefile:
tests/invalid/Mercury.options:
tests/valid/require_tailrec_1.m:
tests/valid/require_tailrec_2.m:
tests/valid/Mmakefile:
tests/valid/Mercury.options:
    Add new tests.

tests/invalid/Mmakefile:
tests/invalid/Mercury.options:
tests/invalid/require_tail_recursion.{m,err_exp} ->
        require_tailrec_invalid.{m,exp}:
    Rename existing test.
2015-12-16 22:47:08 +11:00
..
2015-12-05 06:33:48 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-16 00:09:26 +11:00
2015-10-19 10:49:44 +11:00
2015-11-13 15:03:20 +11:00
2015-11-16 00:09:26 +11:00
2015-12-09 20:25:14 +11:00
2015-12-11 09:01:26 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-12-12 12:48:32 +11:00
2015-09-21 11:34:46 +10:00
2015-12-05 06:36:14 +11:00
2015-12-16 10:03:46 +11:00
2015-11-13 15:03:20 +11:00
2015-11-16 00:09:26 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-12-12 16:03:50 +11:00
2015-11-16 00:09:26 +11:00
2015-12-06 11:03:46 +11:00
2015-11-16 00:09:26 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-12-06 09:49:53 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-16 00:09:26 +11:00
2015-11-16 00:09:26 +11:00
2015-11-16 00:09:26 +11:00
2015-11-13 15:03:20 +11:00
2015-11-16 00:09:26 +11:00
2015-11-13 15:03:20 +11:00
2015-10-21 15:02:19 +11:00
2015-12-06 09:49:53 +11:00
2015-12-12 16:03:50 +11:00
2015-11-16 00:09:26 +11:00
2015-11-16 00:09:26 +11:00
2015-12-12 16:03:50 +11:00
2015-12-08 22:54:59 +11:00
2015-12-12 16:03:50 +11:00
2015-12-05 06:33:48 +11:00
2015-12-12 16:03:50 +11:00
2015-12-05 06:33:48 +11:00
2015-12-05 06:33:48 +11:00
2015-12-05 06:33:48 +11:00
2015-11-16 00:09:26 +11:00
2015-11-22 01:55:19 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-16 00:09:26 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-16 00:09:26 +11:00
2015-12-11 16:35:59 +11:00
2015-10-21 15:02:19 +11:00
2015-12-05 06:33:48 +11:00
2015-12-14 13:55:17 +11:00
2015-11-16 18:14:27 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-11-16 00:09:26 +11:00
2015-11-13 15:03:20 +11:00
2015-11-15 23:13:02 +11:00
2015-12-12 16:03:50 +11:00
2015-09-21 11:34:46 +10:00
2015-11-16 00:09:26 +11:00
2015-11-16 00:09:26 +11:00
2015-11-13 15:03:20 +11:00
2015-12-05 06:33:48 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00
2015-12-06 09:47:04 +11:00
2015-11-13 15:03:20 +11:00
2015-12-13 22:03:30 +11:00
2015-11-13 15:03:20 +11:00
2015-11-13 15:03:20 +11:00