@@ -55,15 +55,14 @@ object PatternMatcher {
55
55
* The pipeline consists of three steps:
56
56
*
57
57
* - build a plan, using methods `matchPlan`, `caseDefPlan`, `patternPlan`.
58
- * - optimize the plan, using methods `optimize`, `hoistLabelled`, `referenceCount`.
58
+ * - optimize the plan, using methods listed in `optimization`,
59
59
* - emit the translated tree, using methods `emit`, `collectSwitchCases`,
60
60
* `emitSwitchCases`, and `emitCondition`.
61
61
*
62
62
* A plan represents the underlying decision graph. It consists
63
63
* of tests, let and label bindings, calls to labels and code blocks.
64
64
* It's represented by its own data type. Plans are optimized by
65
- * inlining, hoisting, and dead code elimination. We should also
66
- * do common test elimination but right now this is missing.
65
+ * inlining, hoisting, and the elimination of redundant tests and dead code.
67
66
*/
68
67
class Translator (resultType : Type , trans : TreeTransform )(implicit ctx : Context , info : TransformerInfo ) {
69
68
@@ -530,7 +529,7 @@ object PatternMatcher {
530
529
*/
531
530
private def inlineLabelled (plan : Plan ) = {
532
531
val refCount = referenceCount(plan)
533
- def toDrop (sym : Symbol ) = labelled.contains(sym) && refCount(sym ) <= 1
532
+ def toDrop (sym : Symbol ) = labelled.contains(sym) && refCount(symb ) <= 1
534
533
def transform (plan : Plan ): Plan = plan match {
535
534
case plan : TestPlan =>
536
535
plan.onSuccess = transform(plan.onSuccess)
0 commit comments