Value

sealed abstract class Value

Abstract values

Value = Hot | Cold | Warm | ThisRef | Fun | RefSet

           Cold
  ┌──────►  ▲   ◄──┐  ◄────┐
  │         │      │       │
  │         │      │       │

ThisRef(C) │ │ │ ▲ │ │ │ │ Warm(D) Fun RefSet │ ▲ ▲ ▲ │ │ │ │ Warm(C) │ │ │ ▲ │ │ │ │ │ │ │ └─────────┴──────┴───────┘ Hot

The most important ordering is the following:

 Hot ⊑ Warm(C) ⊑ ThisRef(C) ⊑ Cold

The diagram above does not reflect relationship between RefSet and other values. RefSet represents a set of values which could be ThisRef, Warm or Fun. The following ordering applies for RefSet:

   R_a ⊑ R_b if R_a ⊆ R_b

   V ⊑ R if V ∈ R
class Object
trait Matchable
class Any
object Hot
object Cold
class Addr
class ThisRef
class Warm
class Fun
class RefSet

Value members

Concrete methods

def call: () => Result
Extension method from Semantic
Extension method from Semantic

Can we promote the value by checking the extrinsic values?

Can we promote the value by checking the extrinsic values?

The extrinsic values are environment values, e.g. outers for Warm and thisV captured in functions.

This is a fast track for early promotion of values.

def instantiate: () => Result
Extension method from Semantic

Handle a new expression new p.C where p is abstracted by value

Handle a new expression new p.C where p is abstracted by value

def join: Value
Extension method from Semantic
def promote: () => List[Error]
Extension method from Semantic

Promotion of values to hot

Promotion of values to hot

def select: () => Result
Extension method from Semantic
def show: String