scala.tools.nsc.transform.patmat.MatchOptimization.CommonSubconditionElimination
ReusingCondTreeMaker
case class ReusingCondTreeMaker(sharedPrefix: List[CommonSubconditionElimination.Test], toReused: (CommonSubconditionElimination.TreeMaker) ⇒ CommonSubconditionElimination.TreeMaker) extends TreeMaker with Product with Serializable
- Alphabetic
- By Inheritance
- ReusingCondTreeMaker
- Serializable
- Serializable
- Product
- Equals
- TreeMaker
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ReusingCondTreeMaker(sharedPrefix: List[CommonSubconditionElimination.Test], toReused: (CommonSubconditionElimination.TreeMaker) ⇒ CommonSubconditionElimination.TreeMaker)
Value Members
-
def
chainBefore(next: CommonSubconditionElimination.Tree)(casegen: CommonSubconditionElimination.Casegen): CommonSubconditionElimination.Tree
- Definition Classes
- ReusingCondTreeMaker → TreeMaker
- lazy val lastReusedTreeMaker: ReusedCondTreeMaker
-
lazy val
localSubstitution: CommonSubconditionElimination.Substitution
- Definition Classes
- ReusingCondTreeMaker → TreeMaker
-
val
pos: Global.Position
- Definition Classes
- ReusingCondTreeMaker → TreeMaker
- val sharedPrefix: List[CommonSubconditionElimination.Test]
-
def
subPatternsAsSubstitution: CommonSubconditionElimination.Substitution
The substitution that specifies the trees that compute the values of the subpattern binders.
The substitution that specifies the trees that compute the values of the subpattern binders.
Should not be used to perform actual substitution! Only used to reason symbolically about the values the subpattern binders are bound to. See TreeMakerToCond#updateSubstitution.
Overridden in PreserveSubPatBinders to pretend it replaces the subpattern binders by subpattern refs (Even though we don't do so anymore -- see scala/bug#5158, scala/bug#5739 and scala/bug#6070.)
TODO: clean this up, would be nicer to have some higher-level way to compute the binders bound by this tree maker and the symbolic values that correspond to them
- Definition Classes
- TreeMaker
-
def
substitution: CommonSubconditionElimination.Substitution
captures the scope and the value of the bindings in patterns important *when* the substitution happens (can't accumulate and do at once after the full matcher has been constructed)
captures the scope and the value of the bindings in patterns important *when* the substitution happens (can't accumulate and do at once after the full matcher has been constructed)
- Definition Classes
- TreeMaker
- val toReused: (CommonSubconditionElimination.TreeMaker) ⇒ CommonSubconditionElimination.TreeMaker
-
def
toString(): String
- Definition Classes
- ReusingCondTreeMaker → AnyRef → Any
The Scala compiler and reflection APIs.