Cache

dotty.tools.dotc.transform.init.Cache
See theCache companion class
object Cache

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Cache.type

Members list

Type members

Classlikes

class ImmutableTreeWrapper(val tree: Tree) extends TreeWrapper

The immutable wrapper is intended to be stored as key in the heap.

The immutable wrapper is intended to be stored as key in the heap.

Attributes

Supertypes
class TreeWrapper
class Object
trait Matchable
class Any

For queries on the heap, reuse the same wrapper to avoid unnecessary allocation.

For queries on the heap, reuse the same wrapper to avoid unnecessary allocation.

A MutableTreeWrapper is only ever used temporarily for querying a map, and is never inserted to the map.

Attributes

Supertypes
class TreeWrapper
class Object
trait Matchable
class Any
abstract class TreeWrapper

A wrapper for trees for storage in maps based on referential equality of trees.

A wrapper for trees for storage in maps based on referential equality of trees.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes

Types

type ExprValueCache[Config, Res] = Map[Config, Map[TreeWrapper, Res]]

Extensions

Extensions

extension [Config, Res](cache: ExprValueCache[Config, Res])
def get(config: Config, expr: Tree)(using queryWrapper: MutableTreeWrapper): Option[Res]
def removed(config: Config, expr: Tree)(using queryWrapper: MutableTreeWrapper): Map[Config, Map[TreeWrapper, Res]]
def updatedNested(config: Config, expr: Tree, result: Res): ExprValueCache[Config, Res]
def updatedNestedWrapper(config: Config, wrapper: ImmutableTreeWrapper, result: Res): ExprValueCache[Config, Res]