[m-rev.] for post-commit review: make clause_to_proc a separate pass

Julien Fischer jfischer at opturion.com
Fri Dec 22 11:40:44 AEDT 2017


Hi Zoltan,

On Thu, 21 Dec 2017, Zoltan Somogyi wrote:

> Make clause_to_proc a separate pass.
> 
> Copying goals from clauses to procedures has to be done after type checking
> (which operates on predicates) but before mode checking (which operates on 
> procedures). Previously, this copying was done within one of the passes
> between type and mode checking, to reduce the overall number of passes.
> For many years now, it was done within the polymorphism pass.
> 
> However, this arrangement has two undesirable consequences.
> 
> The first, which was the reason for this change, is that it makes it
> much harder to see the effects of the polymorphism pass in HLDS dumps,
> since the difference between HLDS dumps before and after the polymorphism
> pass contains not just the effects of the polymorphism transformation itself,
> but also the population of the goal fields of proc_infos.
> 
> The second, which I discovered while doing the change, is that the
> polymorphism pass itself is split. It does the vast bulk of its work
> before copying clauses to procs, but it does leave some tasks to be done
> *after* copying clauses to procs. I don't *know* whether this is
> by design or by accident, but I strongly suspect the latter.

That change looks fine.  (Note there are at least two open bugs 187 and
272 where the polymorphism pass is doing thw wrong thing -- 187 at
least, is related to the handling of clauses by that pass.)

Julien.


More information about the reviews mailing list