Heap

object Heap

Abstract heap stores abstract objects

As in the OOPSLA paper, the abstract heap is monotonistic.

class Object
trait Matchable
class Any

Type members

Types

opaque type Heap

Value members

Concrete methods

def empty: Heap

Note: don't use val to avoid incorrect sharing

Note: don't use val to avoid incorrect sharing

Extensions

Extensions

extension (heap: Heap)
def apply(addr: Addr): Objekt
def contains(addr: Addr): Boolean
def update(addr: Addr, obj: Objekt): Unit
extension (ref: Addr)
def updateField(field: Symbol, value: Value): () => Unit

Update field value of the abstract object

Update field value of the abstract object

Invariant: fields are immutable and only set once from init

def updateOuter(klass: ClassSymbol, value: Value): () => Unit

Update the immediate outer of the given klass of the abstract object

Update the immediate outer of the given klass of the abstract object

Invariant: outers are immutable and only set once from init