Skip to content

Commit eec5732

Browse files
committed
Update documentation
1 parent aaf9d7d commit eec5732

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,14 @@ object PatternMatcher {
5555
* The pipeline consists of three steps:
5656
*
5757
* - 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`,
5959
* - emit the translated tree, using methods `emit`, `collectSwitchCases`,
6060
* `emitSwitchCases`, and `emitCondition`.
6161
*
6262
* A plan represents the underlying decision graph. It consists
6363
* of tests, let and label bindings, calls to labels and code blocks.
6464
* 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.
6766
*/
6867
class Translator(resultType: Type, trans: TreeTransform)(implicit ctx: Context, info: TransformerInfo) {
6968

@@ -530,7 +529,7 @@ object PatternMatcher {
530529
*/
531530
private def inlineLabelled(plan: Plan) = {
532531
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
534533
def transform(plan: Plan): Plan = plan match {
535534
case plan: TestPlan =>
536535
plan.onSuccess = transform(plan.onSuccess)

0 commit comments

Comments
 (0)