scala/scala — pull request #2436 by paulp (2013-04-23 20:39:00+00:00)
Title:      Minor overhaul of lub-producing typer methods.

There were a number of inefficiencies and unnecessary
indirections in these methods. I beat them into better shape.
Some highlights:

- eliminated ptOrLub and similar. We must do something to
suppress peoples' urge to tack a Boolean onto another method:
these methods returned (Type, Boolean) and in addition to
being horribly inefficient, it's vastly harder to follow the
logic. Anything which can be written with a Boolean parameter
or multi-value return can probably be written without the
Boolean parameter and/or the multi-value return.

- eliminated all the vars in the lub producing methods.
Again, it's just a lot easier to understand code when I
don't have to keep scanning up and down to see where and
how previously declared names are being changed midstream.

- added "sameWeakLubAsLub", which is the bit of information
which was being tacked onto ptOrLub. This lets them all find
out in advance whether the lub result implies further tree
adaptation is necessary.