[m-rev.] for review: fix bug 311

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Jul 29 18:57:50 AEST 2014



On Tue, 29 Jul 2014 17:36:14 +1000 (EST), Julien Fischer <jfischer at opturion.com> wrote:
> Please also add an entry to the NEWS file mentioning the bug-fix.

I plan to look into fixing delay_partial_inst so it can automatically move
unifications to avoid the need for the warning (when invoked by
simplify after this sees a warning like this). I plan to add to NEWS
when that is done (whether it turns out to be possible or not).

> > @@ -621,7 +619,9 @@ common_optimise_call_2(SeenCall, InputArgs, OutputArgs, Modes, GoalInfo,
> >              simplify_info_get_module_info(!.Info, ModuleInfo),
> >              modes_to_uni_modes(ModuleInfo, Modes, Modes, UniModes),
> >              create_output_unifications(GoalInfo, OutputArgs, OutputArgs2,
> > -                UniModes, Goals, !Info),
> > +                UniModes, Goals, Common0, _Common1, !Info),
> > +            % XXX should be Common = Common1
> > +            Common = Common0,
> 
> If that must be left as an XXX, make the comment say why it is not currently
> Common1.

I don't know why it isn't; I was just following the logic of the existing code.
This, and ...

> >              % Delete unreachable goals.
> >              (
> > -                simplify_info_get_instmap(!.Info, InstMap1),
> > -                instmap_is_unreachable(InstMap1)
> > +                % XXX InstMap1 after
> > +                % update_instmap(Goal1, InstMap0, InstMap1),
> > +                instmap_is_unreachable(InstMap0)
> 
> Is that XXX something you plan to commit or just a note to yourself?
> (If the former, then more detail is required).

... this are situations I found where the flow of fields embedded in the old
simplify_info (common_info in the first case, instmap in the second case)
did not seem to match what I thought was logical. In the next day or two,
I will see whether changing these two pieces of code has any bad
effects. If not, I will make the changes, and remove the XXXs.

I made the other changes you suggested.

Zoltan.





More information about the reviews mailing list