Heap

dotty.tools.dotc.transform.init.Objects.Heap
object Heap

Abstract heap for mutable fields

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Heap.type

Members list

Type members

Classlikes

class MutableData(var heap: Data)

Store the heap as a mutable field to avoid threading it through the program.

Store the heap as a mutable field to avoid threading it through the program.

Attributes

Supertypes
class Object
trait Matchable
class Any

Types

opaque type Data

Immutable heap data used in the cache.

Immutable heap data used in the cache.

We need to use structural equivalence so that in different iterations the cache can be effective.

TODO: speed up equality check for heap.

Attributes

Value members

Concrete methods

def contains(scope: Scope)(using mutable: MutableData): Boolean
def containsOuter(scope: Scope, outer: Symbol)(using mutable: MutableData): Boolean
def containsVal(scope: Scope, value: Symbol)(using mutable: MutableData): Boolean
def getHeapData()(using mutable: MutableData): Data
def readOuter(scope: Scope, outer: Symbol)(using mutable: MutableData): ScopeSet
def readVal(scope: Scope, value: Symbol)(using mutable: MutableData): Value
def setHeap(newHeap: Data)(using mutable: MutableData): Unit
def writeJoinOuter(scope: Scope, outer: Symbol, outerScope: ScopeSet)(using mutable: MutableData): Unit
def writeJoinVal(scope: Scope, valSymbol: Symbol, value: Value)(using mutable: MutableData): Unit