@@ -378,7 +378,7 @@ object PatternMatcher {
378378 }
379379 }
380380
381- /** Reference counts for all variables and labels */
381+ /** Reference counts for all labels */
382382 private def labelRefCount (plan : Plan ): collection.Map [Symbol , Int ] = {
383383 object refCounter extends RefCounter {
384384 override def apply (plan : LabelledPlan ): Plan = {
@@ -395,7 +395,7 @@ object PatternMatcher {
395395 refCounter.count
396396 }
397397
398- /** Reference counts for all variables and labels */
398+ /** Reference counts for all variables */
399399 private def varRefCount (plan : Plan ): collection.Map [Symbol , Int ] = {
400400 object refCounter extends RefCounter {
401401 override val treeMap = new TreeMap {
@@ -589,7 +589,8 @@ object PatternMatcher {
589589 (new Inliner )(plan)
590590 }
591591
592- /** Merge variables that have the same right hand side
592+ /** Merge variables that have the same right hand side.
593+ * Propagate common variable bindings as parameters into case labels.
593594 */
594595 private def mergeVars (plan : Plan ): Plan = {
595596 class RHS (val tree : Tree ) {
@@ -673,9 +674,8 @@ object PatternMatcher {
673674 (new Merge (Map ()))(plan)
674675 }
675676
676- /** Inline let-bound trees and labelled blocks that are referenced only once.
677- * Drop all variables and labels that are not referenced anymore after this.
678- * Also: hoist cases out of tests using `hoistLabelled`.
677+ /** Inline let-bound trees that are referenced only once.
678+ * Drop all variables that are not referenced anymore after this.
679679 */
680680 private def inlineVars (plan : Plan ): Plan = {
681681 val refCount = varRefCount(plan)
0 commit comments