[m-rev.] for review: warn about moved trace goals

Julien Fischer jfischer at opturion.com
Tue May 6 09:48:52 AEST 2025


On Mon, 5 May 2025 at 20:33, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:

> Generate a warning for moved trace goals.
>
> compiler/mark_trace_goals.m:
>     When we find a trace goal that occurs at a higher line number in a file
>     than the line number of a goal to its left, generate a warning about the
>     move.
>
> compiler/goal_expr_to_goal.m:
>     When converting the parse tree's try goals to HLDS goals, we need
>     to add some goals to the start of code pieces that catch exceptions.
>     Give these goals the context of the try goal as a whole, which will be
>     the context of its start, rather that the context of the catching goal,
>     which (e.g. if it is a conjunction) may point to the *middle* of that goal.
>     This is needed to avoid spurious warnings from the new code in
>     mark_trace_goals.m when the catching goal contains a trace goal.

That's fine.

Julien.


More information about the reviews mailing list