chapel-lang/chapel — pull request #106 by hildeth (2014-08-04 03:06:06+00:00)
Title: Stop iteration in for_exprs_postorder when it reaches the passed-in expression

The initial implementation of for_exprs_postorder did not contain a check to stop
iteration when the passed-in expression was reached, so iteration would continue up to the
root of the expression tree. A check was added at the only place where for_exps_postorder
was used, to stop the iteration. I moved the check inside the definition of
for_exprs_postorder, so it performs the iteration implied by its name. This change should
not have any performance impact.

I also changed the signature of resolve_type_expression to return the resolved expression,
moving the error check from the end of that routine to its sole caller. This positions
resolve_type_expression for use in other places in functionResolution, anticipating
changes introduced by user default constructor calls.

Both changes here will bring chapel-lang/master into closer alignment with my callDefaultConstructors branch, simplifying the merge.