Heap

dotty.tools.dotc.transform.init.Objects.Heap
opaque 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

abstract class Addr

Attributes

Supertypes
class Object
trait Matchable
class Any
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 arrayAddr(regions: Data, owner: ClassSymbol)(using Context): Addr
def contains(addr: Addr)(using mutable: MutableData): Boolean
def fieldVarAddr(regions: Data, sym: Symbol, owner: ClassSymbol): Addr
def getHeapData()(using mutable: MutableData): Data
def localVarAddr(regions: Data, sym: Symbol, owner: ClassSymbol): Addr
def read(addr: Addr)(using mutable: MutableData): Value
def writeJoin(addr: Addr, value: Value)(using mutable: MutableData): Unit