[m-rev.] diff: minor ml_optimize.m improvements

Zoltan Somogyi zoltan.somogyi at runbox.com
Wed Jan 11 14:19:59 AEDT 2017



On Wed, 11 Jan 2017 14:16:42 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> > Use complete switches.
> >
> > compiler/ml_optimize.m:
> >    Replace semidet disjunctions with require_complete_switch scopes,
> >    with some switch arms being `fail'. This should allow us to optimize
> >    some MLDS code we previously didn't, because the disjunctions weren't
> >    updated when static common data structures were added to the MLDS.
> 
> It may be useful if we add a new informational message
> '--inform-incomplete-switch' which prints out where this is happening.

That is a good idea. I will look into it.

> (Also, if the coding standard doesn't already specify it we should
> require that all switch be complete, precisely to avoid the above
> situation.)

That is also a good idea, and just specifying the new option
by default would enforce it nicely.

Zoltan.




More information about the reviews mailing list