Separating

dotty.tools.dotc.cc.CaptureSet.VarState.Separating
class Separating extends Closed

A closed state that allows a Fresh instance to subsume a reference r only if r is already present in the hidden set of the instance. No new references can be added.

Attributes

Graph
Supertypes
class Closed
class VarState
class Object
trait Matchable
class Any
Known subtypes
object HardSeparate
object Separate

Members list

Value members

Concrete methods

override def addHidden(hidden: HiddenSet, elem: Capability)(using Context): Boolean

Add element to hidden set, recording it in elemsMap, return whether this was allowed. By default, recording is allowed but the special state VarState.Separate overrides this.

Add element to hidden set, recording it in elemsMap, return whether this was allowed. By default, recording is allowed but the special state VarState.Separate overrides this.

Attributes

Definition Classes
override def isSeparating: Boolean

Attributes

Definition Classes
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Closed -> VarState -> Any

Inherited methods

override def canRecord: Boolean

Record elements, return whether this was allowed. By default, recording is allowed in regular but not in frozen states.

Record elements, return whether this was allowed. By default, recording is allowed in regular but not in frozen states.

Attributes

Definition Classes
Inherited from:
Closed
def ifNotSeen(ref: Capability)(pred: => Boolean): Boolean

Run test pred unless ref was seen in an enclosing ifNotSeen operation

Run test pred unless ref was seen in an enclosing ifNotSeen operation

Attributes

Inherited from:
VarState
override def isOpen: Boolean

Does this state allow additions of elements to capture set variables?

Does this state allow additions of elements to capture set variables?

Attributes

Definition Classes
Inherited from:
Closed
def unify(c1: ResultCap, c2: ResultCap)(using Context): Boolean

If root1 and root2 belong to the same binder but have different originalBinders it means that one of the roots was mapped to the binder of the other by a substBinder when comparing two method types. In that case we can unify the two roots1, provided none of the two roots have already been unified themselves. So unification must be 1-1.

If root1 and root2 belong to the same binder but have different originalBinders it means that one of the roots was mapped to the binder of the other by a substBinder when comparing two method types. In that case we can unify the two roots1, provided none of the two roots have already been unified themselves. So unification must be 1-1.

Note, see (**) below: We also allow unifications of results that have different ExprType binders. This is necessary because ExprTypes don't get updated with SubstBindingMaps. It's sound since ExprTypes always appear alone and at the top-level, so there is no problem with confusing results at different levels. See pos-customargs/captures/overrides.scala for a test case.

Attributes

Inherited from:
VarState