Value

dotty.tools.dotc.transform.init.Objects.Value
sealed trait Value

Syntax for the data structure abstraction used in abstract domain:

ve ::= ObjectRef(class) // global object | OfClass(class, ownerObject, ctor, regions) // instance of a class | OfArray(ownerObject, regions) // represents values of native array class in Array.scala | Fun(code, LocalEnv) // value elements that can be contained in ValueSet | SafeValue // values on which method calls and field accesses won't cause warnings. Int, String, etc. | UnknownValue // values whose source are unknown at compile time vs ::= ValueSet(ve) // set of abstract values Bottom ::= ValueSet(Empty) // unreachable code val ::= ve | vs | Package Ref ::= ObjectRef | OfClass | OfArray // values that represent a reference to some (global or instance) object ThisValue ::= Ref | Set(Ref) // possible values for 'this' LocalEnv(meth, ownerObject) // represents environments for methods or functions Scope ::= Ref | LocalEnv ScopeSet ::= Set(Scope)

valsMap = sym -> val // maps variables to their values outersMap = sym -> ScopeSet // maps the possible outer scopes for a corresponding (parent) class heap.MutableData = Scope -> (valsMap, outersMap) // heap is mutable

regions ::= List(sourcePosition)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Package
trait ValueElement
class Fun
class Ref
class ObjectRef
class OfArray
class OfClass
class SafeValue
object UnknownValue
class ValueSet
Show all

Members list

Value members

Abstract methods

def show(using Context): String

Concrete methods

def filterClass(sym: Symbol)(using Context): Value
Extension method from Objects
def filterType(tpe: Type)(using Context): Value
Extension method from Objects
def remove(b: Value): Value
Extension method from Objects