GlobalCap

dotty.tools.dotc.cc.Capabilities.GlobalCap
object GlobalCap extends RootCapability

The global root capability referenced as caps.cap cap does not subsume other capabilities, except in arguments of withCapAsRoot calls.

Attributes

Graph
Supertypes
trait Capability
trait Showable
class Object
trait Matchable
class Any
Show all
Self type
GlobalCap.type

Members list

Value members

Concrete methods

override def cached[C <: DerivedCapability](newRef: C): C

Attributes

Definition Classes
override def captureSetOfInfo(using Context): CaptureSet

The capture set of the type underlying this reference

The capture set of the type underlying this reference

Attributes

Definition Classes
def descr(using Context): String
override def invalidateCaches(): Unit

Attributes

Definition Classes
override def reach: Reach | ReadOnly | Maybe

Attributes

Definition Classes
override def singletonCaptureSet(using Context): Const

The capture set consisting of exactly this reference

The capture set consisting of exactly this reference

Attributes

Definition Classes

Inherited methods

Attributes

Inherited from:
Capability
final def ccOwner(using Context): Symbol

Attributes

Inherited from:
Capability

The non-derived capability underlying this capability

The non-derived capability underlying this capability

Attributes

Inherited from:
Capability
final def coreType: CoreCapability | NoType.type

The type underlying this capability, NoType for root capabilities

The type underlying this capability, NoType for root capabilities

Attributes

Inherited from:
Capability
final def covers(y: Capability)(using Context): Boolean

x covers y if we should retain y when computing the overlap of two footprints which have x respectively y as elements. We assume that .rd have already been stripped on both sides. We have:

x covers y if we should retain y when computing the overlap of two footprints which have x respectively y as elements. We assume that .rd have already been stripped on both sides. We have:

x covers x x covers y ==> x covers y.f x covers y ==> x* covers y*, x? covers y? TODO what other clauses from subsumes do we need to port here?

Attributes

Inherited from:
Capability

Tests whether the capability derives from capability class cls.

Tests whether the capability derives from capability class cls.

Attributes

Inherited from:
Capability

Attributes

Inherited from:
Capability

Attributes

Inherited from:
Capability

Attributes

Inherited from:
Capability
def fallbackToText(printer: Printer): Text

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

A fallback text representation, if the pattern matching in Printers does not have a case for this showable element

Attributes

Inherited from:
Showable
final def isCapOrFresh(using Context): Boolean

Is this reference the generic root capability cap or a Fresh instance?

Is this reference the generic root capability cap or a Fresh instance?

Attributes

Inherited from:
Capability
final def isExclusive(using Context): Boolean

An exclusive capability is a capability that derives indirectly from a maximal capability without going through a read-only capability first.

An exclusive capability is a capability that derives indirectly from a maximal capability without going through a read-only capability first.

Attributes

Inherited from:
Capability
final def isMaybe(using Context): Boolean

Is this a maybe reference of the form x??

Is this a maybe reference of the form x??

Attributes

Inherited from:
Capability
final def isParamPath(using Context): Boolean

Attributes

Inherited from:
Capability
final def isReach(using Context): Boolean

Is this a reach reference of the form x* or a readOnly or maybe variant of a reach reference?

Is this a reach reference of the form x* or a readOnly or maybe variant of a reach reference?

Attributes

Inherited from:
Capability
final def isReadOnly(using Context): Boolean

Is this a read-only reference of the form x.rd or x.rd? or a capture set variable with only read-ony references in its upper bound?

Is this a read-only reference of the form x.rd or x.rd? or a capture set variable with only read-ony references in its upper bound?

Attributes

Inherited from:
Capability

Is this reference a root capability or a derived version of one? These capabilities have themselves as their captureSetOfInfo.

Is this reference a root capability or a derived version of one? These capabilities have themselves as their captureSetOfInfo.

Attributes

Inherited from:
Capability
final def isTracked(using Context): Boolean

Is the reference tracked? This is true if it can be tracked and the capture set of the underlying type is not always empty.

Is the reference tracked? This is true if it can be tracked and the capture set of the underlying type is not always empty.

Attributes

Inherited from:
Capability
final def isWellformed(using Context): Boolean

Attributes

Inherited from:
Capability
final def levelOwner(using Context): Symbol

The symbol that represents the level closest-enclosing ccOwner. Symbols representing levels are

The symbol that represents the level closest-enclosing ccOwner. Symbols representing levels are

  • class symbols, but not inner (non-static) module classes
  • method symbols, but not accessors or constructors

Attributes

Inherited from:
Capability
def maxSubsumes(y: Capability, canAddHidden: Boolean)(using ctx: Context)(using vs: VarState): Boolean

This is a maximal capability that subsumes y in given context and VarState.

This is a maximal capability that subsumes y in given context and VarState.

Value parameters

canAddHidden

If true we allow maximal capabilities to subsume all other capabilities. We add those capabilities to the hidden set if this is a Fresh instance. If false we only accept y elements that are already in the hidden set of this Fresh instance. The idea is that in a VarState that accepts additions we first run maxSubsumes with canAddHidden = false so that new variables get added to the sets. If that fails, we run the test again with canAddHidden = true as a last effort before we fail a comparison.

Attributes

Inherited from:
Capability
final def maybeExclusive(using Context): Boolean

Similar to isExlusive, but also includes capabilties with capture set variables in their info whose status is still open.

Similar to isExlusive, but also includes capabilties with capture set variables in their info whose status is still open.

Attributes

Inherited from:
Capability
final def paramPathRoot(using Context): Type

Attributes

Inherited from:
Capability
final def pathOwner(using Context): Symbol

The logical owner of the root of this class:

The logical owner of the root of this class:

  • If this path starts with C.this, the class C.
  • If it starts with a reference r, r's owner.
  • If it starts with cap, the scala.caps package class.
  • If it starts with a fresh instance, its owner.
  • If it starts with a ParamRef or a ResultCap, NoSymbol.

Attributes

Inherited from:
Capability
final def pathRoot(using Context): Capability

The first element of this path type, skipping selections and qualifiers. Note that class parameter references are of the form this.C but their pathroot is still this.C, not this.

The first element of this path type, skipping selections and qualifiers. Note that class parameter references are of the form this.C but their pathroot is still this.C, not this.

Attributes

Inherited from:
Capability
def show(using Context): String

The string representation of this showable element.

The string representation of this showable element.

Attributes

Inherited from:
Showable
def showIndented(margin: Int)(using Context): String

The string representation with each line after the first one indented by the given given margin (in spaces).

The string representation with each line after the first one indented by the given given margin (in spaces).

Attributes

Inherited from:
Showable
def showSummary(depth: Int)(using Context): String

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

The summarized string representation of this showable element. Recursion depth is limited to some smallish value. Default is Config.summarizeDepth.

Attributes

Inherited from:
Showable
final def stripMaybe(using Context): Capability

Attributes

Inherited from:
Capability
final def stripReach(using Context): Capability

Attributes

Inherited from:
Capability
final def stripReadOnly(using Context): Capability

Attributes

Inherited from:
Capability
final def subsumes(y: Capability)(using ctx: Context)(using vs: VarState): Boolean

x subsumes x x =:= y ==> x subsumes y x subsumes y ==> x subsumes y.f x subsumes y ==> x* subsumes y, x subsumes y? x subsumes y ==> x* subsumes y*, x? subsumes y? x: x1.type /\ x1 subsumes y ==> x subsumes y X = CapSet^cx, exists rx in cx, rx subsumes y ==> X subsumes y Y = CapSet^cy, forall ry in cy, x subsumes ry ==> x subsumes Y X: CapSet^c1...CapSet^c2, (CapSet^c1) subsumes y ==> X subsumes y Y: CapSet^c1...CapSet^c2, x subsumes (CapSet^c2) ==> x subsumes Y Contains[X, y] ==> X subsumes y

x subsumes x x =:= y ==> x subsumes y x subsumes y ==> x subsumes y.f x subsumes y ==> x* subsumes y, x subsumes y? x subsumes y ==> x* subsumes y*, x? subsumes y? x: x1.type /\ x1 subsumes y ==> x subsumes y X = CapSet^cx, exists rx in cx, rx subsumes y ==> X subsumes y Y = CapSet^cy, forall ry in cy, x subsumes ry ==> x subsumes Y X: CapSet^c1...CapSet^c2, (CapSet^c1) subsumes y ==> X subsumes y Y: CapSet^c1...CapSet^c2, x subsumes (CapSet^c2) ==> x subsumes Y Contains[X, y] ==> X subsumes y

Attributes

Inherited from:
Capability
def toText(printer: Printer): Text

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

The text representation of this showable element. This normally dispatches to a pattern matching method in Printers.

Attributes

Inherited from:
Capability
def toType(using Context): Type

The type representing this capability. Note this method does not distinguish different RootCapability instances, and should only be used for printing or phases not related to CC.

The type representing this capability. Note this method does not distinguish different RootCapability instances, and should only be used for printing or phases not related to CC.

Attributes

Inherited from:
Capability

Concrete fields

override val maybe: Maybe
override val readOnly: ReadOnly | Maybe

Inherited fields

val rootId: Int

Attributes

Inherited from:
RootCapability